cedric pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=1cc793f5646a17b1dc4aa2a9b828657591d73cef
commit 1cc793f5646a17b1dc4aa2a9b828657591d73cef Author: Cedric BAIL <[email protected]> Date: Thu Dec 26 11:36:51 2013 +0900 Revert "Do not let CUU and CUD scroll off screen." This reverts commit 5ab7a6f827d141262a9528b465f0c127fa24cc59. This patch did completely break emacs for me. I have no idea what the intent was, but at least my application/OS is broken. --- src/bin/termptyesc.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index af19534..77e1d9d 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -378,19 +378,25 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) case 'A': // cursor up N case 'e': // cursor up N arg = _csi_arg_get(&b); + if (arg < 1) arg = 1; DBG("cursor up %d", arg); ty->state.wrapnext = 0; - ty->state.cy -= arg; - ty->state.cy = MAX(0, ty->state.cy); - ty->state.cy = MIN(ty->h - 1, ty->state.cy); + for (i = 0; i < arg; i++) + { + ty->state.cy--; + _termpty_text_scroll_rev_test(ty, EINA_FALSE); + } break; case 'B': // cursor down N arg = _csi_arg_get(&b); + if (arg < 1) arg = 1; DBG("cursor down %d", arg); ty->state.wrapnext = 0; - ty->state.cy += arg; - ty->state.cy = MAX(0, ty->state.cy); - ty->state.cy = MIN(ty->h - 1, ty->state.cy); + for (i = 0; i < arg; i++) + { + ty->state.cy++; + _termpty_text_scroll_test(ty, EINA_FALSE); + } break; case 'D': // cursor left N arg = _csi_arg_get(&b); --
