Skip to content
Snippets Groups Projects
Commit 38e98ade authored by deuce's avatar deuce
Browse files

goto position 1,1 before returning from edit() to prevent hit any key prompt

when exiting from last edit line.
parent ff98d6ea
No related branches found
No related tags found
No related merge requests found
...@@ -1366,8 +1366,10 @@ function edit(quote_first) ...@@ -1366,8 +1366,10 @@ function edit(quote_first)
redraw_screen(); redraw_screen();
if(quote_first) { if(quote_first) {
if(quote_mode()) if(quote_mode()) {
console.gotoxy(1,1);
return; return;
}
} }
while(1) { while(1) {
set_cursor(); set_cursor();
...@@ -1646,6 +1648,7 @@ function edit(quote_first) ...@@ -1646,6 +1648,7 @@ function edit(quote_first)
xpos=line[ypos].text.length; xpos=line[ypos].text.length;
break; break;
case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */ case '\x11': /* CTRL-Q (XOff) (Quick Abort in SyncEdit) */
console.gotoxy(1,1);
return; return;
case '\x12': /* CTRL-R (Quick Redraw in SyncEdit) */ case '\x12': /* CTRL-R (Quick Redraw in SyncEdit) */
redraw_screen(); redraw_screen();
...@@ -1663,8 +1666,10 @@ function edit(quote_first) ...@@ -1663,8 +1666,10 @@ function edit(quote_first)
break; break;
case '\x15': /* CTRL-U (Quick Quote in SyncEdit) */ case '\x15': /* CTRL-U (Quick Quote in SyncEdit) */
if(quote_line.length>0) { if(quote_line.length>0) {
if(quote_mode()) if(quote_mode()) {
console.gotoxy(1,1);
return; return;
}
} }
else else
console.beep(); console.beep();
...@@ -1747,6 +1752,7 @@ function edit(quote_first) ...@@ -1747,6 +1752,7 @@ function edit(quote_first)
var s=make_strings(true,true); var s=make_strings(true,true);
f.write(s[0]); f.write(s[0]);
f.close(); f.close();
console.gotoxy(1,1);
return; return;
case '\x1b': /* ESC (This should parse extra ANSI sequences) */ case '\x1b': /* ESC (This should parse extra ANSI sequences) */
break; break;
...@@ -1766,6 +1772,7 @@ function edit(quote_first) ...@@ -1766,6 +1772,7 @@ function edit(quote_first)
try_prev_line(); try_prev_line();
break; break;
case '\x1f': /* CTRL-_ Safe quick-abort*/ case '\x1f': /* CTRL-_ Safe quick-abort*/
console.gotoxy(1,1);
return; return;
case '\x7f': /* DELETE */ case '\x7f': /* DELETE */
last_xpos=-1; last_xpos=-1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment