- Initialize totsize (DLR).
- nano.c:
main()
- - Added vars oldcurrent and oldcurrent_x to check whether cursor
+ - Added var constcheck as a CRC-like check of whether cursor
pos has changed and if so update the pos with -c.
- Many tweaks and changes from numerics to char equivs
(David Lawrence Ramsey).
int keyhandled; /* Have we handled the keystroke yet? */
int i, modify_control_seq;
char *argv0;
- filestruct *oldcurrent; /* Check to constantly update */
- int oldcurrent_x; /* Same */
+ long constcheck; /* Check to constantly update */
#ifdef _POSIX_VDISABLE
struct termios term;
reset_cursor();
while (1) {
- oldcurrent = current;
- oldcurrent_x = current_x;
+ constcheck = current->lineno + current_x + totsize;
#ifndef DISABLE_MOUSE
currshortcut = main_list;
if (ISSET(DISABLE_CURPOS))
UNSET(DISABLE_CURPOS);
else if (ISSET(CONSTUPDATE))
- if (current != oldcurrent || current_x != oldcurrent_x)
+ if (constcheck != current->lineno + current_x + totsize)
do_cursorpos();
reset_cursor();