mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-03-03 07:29:58 +00:00
Updates selection without redraw for cursor_right().
This commit is contained in:
parent
c69453ab62
commit
69ddaab305
20
apps/edit.c
20
apps/edit.c
@ -817,20 +817,24 @@ void cursor_right(void) {
|
||||
gapbuf[gapbegin++] = gapbuf[++gapend];
|
||||
else {
|
||||
beep();
|
||||
gotoxy(curscol, cursrow);
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
++curscol;
|
||||
if (gapend == BUFSZ - 1) {
|
||||
gotoxy(curscol, cursrow);
|
||||
return;
|
||||
}
|
||||
if (gapend == BUFSZ - 1)
|
||||
goto done;
|
||||
if (curscol == rowlen[cursrow]) {
|
||||
if (cursrow == NROWS - 1)
|
||||
scroll_down();
|
||||
++cursrow;
|
||||
curscol = 0;
|
||||
}
|
||||
done:
|
||||
if (mode > SEL_MOVE2) {
|
||||
endsel = gapbegin;
|
||||
revers(1);
|
||||
cputc(gapbuf[gapbegin - 1]);
|
||||
revers(0);
|
||||
}
|
||||
gotoxy(curscol, cursrow);
|
||||
}
|
||||
#pragma code-name (pop)
|
||||
@ -1388,10 +1392,6 @@ int edit(char *fname) {
|
||||
break;
|
||||
case 0x15: // Right
|
||||
cursor_right();
|
||||
if (mode > SEL_MOVE2) {
|
||||
endsel = gapbegin;
|
||||
draw_screen();
|
||||
}
|
||||
break;
|
||||
case 0x0b: // Up
|
||||
cursor_up();
|
||||
|
Loading…
x
Reference in New Issue
Block a user