path: root/src/bin/termptyesc.c
diff options
authorBoris Faure <billiob@gmail.com>2014-12-07 23:51:23 +0100
committerBoris Faure <billiob@gmail.com>2014-12-07 23:51:23 +0100
commitcbc92a55fc89e4a21fef0462b31c19597a5a1c02 (patch)
treefdd16070adbef7e047ec3dcc84b39ac116307b52 /src/bin/termptyesc.c
parentRevert "introduce Term_Container" (diff)
Fix screen mangling from prompt redraws on resize. Closes https://phab.enlightenment.org/T1193
There are still some oddities because the shell doesn't expect us to reflow. Let's say we have the following where X is the cursor. +-------+ |foobar$| |X | +-------+ Here, the shell explicitly told us to go to a new line after '$'. We don't consider '$' is on the same line as 'foobar'. Decrease the width of that window. +------+ |foobar| |$ | |X | +------+ Let the shell know the new size. It decides to redraw the prompt. It remembers it told us to go to a new line, so the first thing it tells us is to go one line up: to '$' and not 'foobar'. Then it tells us to clear the screen downward from there and to print "foobar$" (and go to new line). Thus we have the following: +------+ |foobar| |foobar| |$ | |X | +------+
Diffstat (limited to 'src/bin/termptyesc.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index b242011..d0fd99e 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -99,8 +99,8 @@ _handle_cursor_control(Termpty *ty, const Eina_Unicode *cc)
ty->state.had_cr_x = ty->state.cx;
ty->state.had_cr_y = ty->state.cy;
+ ty->state.wrapnext = 0;
- ty->state.wrapnext = 0;
ty->state.cx = 0;
// ty->state.had_cr = 1;