Fixed cursor right bug when line >80 chars

This commit is contained in:
Bobbi Webber-Manners 2020-08-01 23:18:13 -04:00
parent 9c5d507376
commit 827b994dc6
2 changed files with 5 additions and 7 deletions

View File

@ -5,11 +5,9 @@
// Note: Use my fork of cc65 to get a flashing cursor!!
// TODO: Bug handling file with lines of 80 chars + CR. Cursor right doesn't
// work properly at the end of such lines
// TODO: Minor bug - can delete too many chars from status line
// TODO: Should be smarter about redrawing when updating selection!!!
// TODO: Doesn't check for error cases when calling gap buffer functions
// TODO: Should be smarter about redrawing when updating selection!!!
// TODO: Make use of aux mem
#include <conio.h>
@ -304,7 +302,7 @@ char prompt_okay(char *msg) {
void show_error(char *msg) {
cursor(0);
goto_prompt_row();
clrline();
clreol();
beep();
revers(1);
cprintf("%s [Press Any Key]", msg);
@ -800,12 +798,12 @@ void cursor_right(void) {
}
++curscol;
if (curscol == rowlen[cursrow]) {
if (gapbuf[gapbegin - 1] == EOL) {
// if (gapbuf[gapbegin - 1] == EOL) {
if (cursrow == NROWS - 1)
scroll_down();
++cursrow;
curscol = 0;
}
// }
}
gotoxy(curscol, cursrow);
}

View File

@ -4,7 +4,7 @@
// Bobbi June 2020
/////////////////////////////////////////////////////////////////
#define PROGNAME "emai//er v0.92"
#define PROGNAME "emai//er v0.93"
// Configuration params from POP65.CFG
char cfg_server[40]; // IP of POP3 server