aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Poole <netstar@gmail.com>2016-12-06 23:42:10 +0100
committerBoris Faure <billiob@gmail.com>2016-12-06 23:42:10 +0100
commit8dd7aefcb442c37aa9f28c89ef8ab1b13db4583c (patch)
treee5b065ad01276b01b54dabf5faadcd41960e70df
parenttermpty: handle BSD special case when the other side of the tty pair has quit (diff)
downloadterminology-8dd7aefcb442c37aa9f28c89ef8ab1b13db4583c.tar.gz
Fix bogus hack and restore cursor position to its right place. On OpenBSD and DragonFly the cursor is being incorrectly placed. Seems there was a Linux workaround too. My guess is this will fix that also.
Summary: Should help anyway. Reviewers: billiob, raster Differential Revision: https://phab.enlightenment.org/D4465
-rw-r--r--src/bin/termio.c13
-rw-r--r--src/bin/termpty.c3
2 files changed, 11 insertions, 5 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 404f305..e17f263 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -5098,8 +5098,17 @@ _smart_size(Evas_Object *obj, int w, int h, Eina_Bool force)
Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN(sd);
- if (w < 1) w = 1;
- if (h < 1) h = 1;
+ if (w <= 1)
+ {
+ h = 24;
+ w = 80;
+ }
+ else if (h <= 1)
+ {
+ h = 24;
+ w = 80;
+ }
+
if (!force)
{
if ((w == sd->grid.w) && (h == sd->grid.h)) return;
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 0d5f77d..4c9330d 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -1148,10 +1148,7 @@ termpty_resize(Termpty *ty, int new_w, int new_h)
effective_old_h;
int altbuf = 0;
struct screen_info new_si = {.screen = NULL};
-
if ((ty->w == new_w) && (ty->h == new_h)) return;
- if ((new_w == new_h) && (new_w == 1)) return; // FIXME: something weird is
- // going on at term init
termpty_backlog_lock();