mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-10-01 21:56:43 +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];
|
gapbuf[gapbegin++] = gapbuf[++gapend];
|
||||||
else {
|
else {
|
||||||
beep();
|
beep();
|
||||||
gotoxy(curscol, cursrow);
|
goto done;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
++curscol;
|
++curscol;
|
||||||
if (gapend == BUFSZ - 1) {
|
if (gapend == BUFSZ - 1)
|
||||||
gotoxy(curscol, cursrow);
|
goto done;
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (curscol == rowlen[cursrow]) {
|
if (curscol == rowlen[cursrow]) {
|
||||||
if (cursrow == NROWS - 1)
|
if (cursrow == NROWS - 1)
|
||||||
scroll_down();
|
scroll_down();
|
||||||
++cursrow;
|
++cursrow;
|
||||||
curscol = 0;
|
curscol = 0;
|
||||||
}
|
}
|
||||||
|
done:
|
||||||
|
if (mode > SEL_MOVE2) {
|
||||||
|
endsel = gapbegin;
|
||||||
|
revers(1);
|
||||||
|
cputc(gapbuf[gapbegin - 1]);
|
||||||
|
revers(0);
|
||||||
|
}
|
||||||
gotoxy(curscol, cursrow);
|
gotoxy(curscol, cursrow);
|
||||||
}
|
}
|
||||||
#pragma code-name (pop)
|
#pragma code-name (pop)
|
||||||
@ -1388,10 +1392,6 @@ int edit(char *fname) {
|
|||||||
break;
|
break;
|
||||||
case 0x15: // Right
|
case 0x15: // Right
|
||||||
cursor_right();
|
cursor_right();
|
||||||
if (mode > SEL_MOVE2) {
|
|
||||||
endsel = gapbegin;
|
|
||||||
draw_screen();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 0x0b: // Up
|
case 0x0b: // Up
|
||||||
cursor_up();
|
cursor_up();
|
||||||
|
Loading…
Reference in New Issue
Block a user