Commit aea4dabf authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

per DB's patch, remove some unneeded reset_cursor() calls, move the one

in the main input loop to the top, and remove the apparently unneeded
wrefresh() call in the main input loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1855 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 7 additions and 9 deletions
+7 -9
...@@ -38,6 +38,8 @@ CVS code - ...@@ -38,6 +38,8 @@ CVS code -
errors. Also exit instead of calling usage() in the event of errors. Also exit instead of calling usage() in the event of
an invalid fill value, for consistency with how an invalid an invalid fill value, for consistency with how an invalid
tabsize value is handled. tabsize value is handled.
- Remove several unnecessary reset_cursor() calls. (David
Benbennick)
- files.c: - files.c:
close_open_file() close_open_file()
- Tweak to no longer rely on the return values of - Tweak to no longer rely on the return values of
...@@ -65,6 +67,10 @@ CVS code - ...@@ -65,6 +67,10 @@ CVS code -
the same line. (DLR) the same line. (DLR)
do_exit() do_exit()
- Tweak for efficiency. (David Benbennick) - Tweak for efficiency. (David Benbennick)
main()
- Move the reset_cursor() call to the beginning of the main
input loop, and remove the apparently unnecessary wrefresh()
call. (David Benbennick)
- proto.h: - proto.h:
- Change the variables in the prototypes for do_justify(), - Change the variables in the prototypes for do_justify(),
get_verbatim_kbinput(), and get_mouseinput() to match the ones get_verbatim_kbinput(), and get_mouseinput() to match the ones
......
...@@ -2652,7 +2652,6 @@ void do_justify(int full_justify) ...@@ -2652,7 +2652,6 @@ void do_justify(int full_justify)
/* Display the shortcut list with UnJustify. */ /* Display the shortcut list with UnJustify. */
shortcut_init(TRUE); shortcut_init(TRUE);
display_main_list(); display_main_list();
reset_cursor();
/* Now get a keystroke and see if it's unjustify; if not, unget the /* Now get a keystroke and see if it's unjustify; if not, unget the
* keystroke and return. */ * keystroke and return. */
...@@ -3519,11 +3518,11 @@ int main(int argc, char *argv[]) ...@@ -3519,11 +3518,11 @@ int main(int argc, char *argv[])
#endif #endif
edit_refresh(); edit_refresh();
reset_cursor();
while (TRUE) { while (TRUE) {
keyhandled = FALSE; keyhandled = FALSE;
reset_cursor();
if (ISSET(CONSTUPDATE)) if (ISSET(CONSTUPDATE))
do_cursorpos(TRUE); do_cursorpos(TRUE);
...@@ -3642,8 +3641,6 @@ int main(int argc, char *argv[]) ...@@ -3642,8 +3641,6 @@ int main(int argc, char *argv[])
do_char((char)kbinput); do_char((char)kbinput);
} }
} }
reset_cursor();
wrefresh(edit);
} }
assert(FALSE); assert(FALSE);
} }
...@@ -2707,9 +2707,6 @@ void edit_refresh(void) ...@@ -2707,9 +2707,6 @@ void edit_refresh(void)
nlines++; nlines++;
} }
reset_cursor(); reset_cursor();
/* What the hell are we expecting to update the screen if this
* isn't here? Luck? */
wrefresh(edit); wrefresh(edit);
} }
} }
...@@ -2997,8 +2994,6 @@ void do_cursorpos(int constant) ...@@ -2997,8 +2994,6 @@ void do_cursorpos(int constant)
old_i = i; old_i = i;
old_totsize = totsize; old_totsize = totsize;
reset_cursor();
} }
void do_cursorpos_void(void) void do_cursorpos_void(void)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment