From 4d8b7f79c8fbdc3b91631abc8ceed350829c6d06 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 15 Jun 2008 10:15:39 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 1 + doc/rxvt.7.pod | 2 ++ src/screen.C | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/Changes b/Changes index 1b7e9f5a..869887ed 100644 --- a/Changes +++ b/Changes @@ -30,6 +30,7 @@ TODO: implement initial chdir for tabs by making it a resource? after EILSEQ (patch by Neil Booth). This fixes the issue of rxvt-unicode not properly displaying text after an illegal sequence on NetBSD and probably other systems. + - implement ESC [ 3 K as a more rational alternative to ESC [ 0 K. - made tabs moveable (based on a patch by Petr Machata). - support relative paths for RXVT_SOCKET in urxvtd. - better diagnostic on 0x0 window geometries. diff --git a/doc/rxvt.7.pod b/doc/rxvt.7.pod index 73de779a..b850bcfe 100644 --- a/doc/rxvt.7.pod +++ b/doc/rxvt.7.pod @@ -1459,6 +1459,8 @@ Erase in Line (EL) B<< C >> Clear to Right (default) B<< C >> Clear to Left B<< C >> Clear All + B<< C >> Like Ps = 0, but is ignored when wrapped + (@@RXVT_NAME@@ extension) =end table diff --git a/src/screen.C b/src/screen.C index 2d34281a..4e0f21d1 100644 --- a/src/screen.C +++ b/src/screen.C @@ -1227,6 +1227,7 @@ rxvt_term::scr_index (enum page_dirn direction) NOTHROW * XTERM_SEQ: Clear line to right: ESC [ 0 K * XTERM_SEQ: Clear line to left : ESC [ 1 K * XTERM_SEQ: Clear whole line : ESC [ 2 K + * extension: clear to right unless wrapped: ESC [ 3 K */ void rxvt_term::scr_erase_line (int mode) NOTHROW @@ -1245,21 +1246,31 @@ rxvt_term::scr_erase_line (int mode) NOTHROW switch (mode) { + case 3: + if (screen.flags & Screen_WrapNext) + return; + + /* fall through */ + case 0: /* erase to end of line */ col = screen.cur.col; num = ncol - col; min_it (line.l, col); + if (ROWCOL_IN_ROW_AT_OR_AFTER (selection.beg, screen.cur) || ROWCOL_IN_ROW_AT_OR_AFTER (selection.end, screen.cur)) CLEAR_SELECTION (); break; + case 1: /* erase to beginning of line */ col = 0; num = screen.cur.col + 1; + if (ROWCOL_IN_ROW_AT_OR_BEFORE (selection.beg, screen.cur) || ROWCOL_IN_ROW_AT_OR_BEFORE (selection.end, screen.cur)) CLEAR_SELECTION (); break; + case 2: /* erase whole line */ col = 0; num = ncol; -- 2.34.1