Commit 0357c4d5 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

- nano.c: main() - Added vars oldcurrent and oldcurrent_x to check whether...

- nano.c: main() - Added vars oldcurrent and oldcurrent_x to check whether cursor pos has changed and if so update the pos with -c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 8 deletions
+11 -8
...@@ -6,6 +6,10 @@ CVS code - ...@@ -6,6 +6,10 @@ CVS code -
use a flag instead (just as messy?) use a flag instead (just as messy?)
- --enable-tiny now leaves out the Auto Indent code, do you really - --enable-tiny now leaves out the Auto Indent code, do you really
need that on a bootdisk? =-) need that on a bootdisk? =-)
- nano.c:
main()
- Added vars oldcurrent and oldcurrent_x to check whether cursor
pos has changed and if so update the pos with -c.
- nano.texi: - nano.texi:
- corrected the Mouse Toggle section, noticed by Daniel Bonniot. - corrected the Mouse Toggle section, noticed by Daniel Bonniot.
- winio.c: - winio.c:
......
...@@ -608,7 +608,6 @@ int do_mark(void) ...@@ -608,7 +608,6 @@ int do_mark(void)
edit_refresh(); edit_refresh();
} }
#endif #endif
SET(DISABLE_CURPOS);
return 1; return 1;
} }
...@@ -2322,8 +2321,6 @@ void do_toggle(int which) ...@@ -2322,8 +2321,6 @@ void do_toggle(int which)
statusbar("%s %s", toggles[which].desc, enabled); statusbar("%s %s", toggles[which].desc, enabled);
} }
SET(DISABLE_CURPOS);
#endif #endif
} }
...@@ -2370,6 +2367,9 @@ int main(int argc, char *argv[]) ...@@ -2370,6 +2367,9 @@ int main(int argc, char *argv[])
int keyhandled; /* Have we handled the keystroke yet? */ int keyhandled; /* Have we handled the keystroke yet? */
int i, modify_control_seq; int i, modify_control_seq;
char *argv0; char *argv0;
filestruct *oldcurrent; /* Check to constantly update */
int oldcurrent_x; /* Same */
#ifdef _POSIX_VDISABLE #ifdef _POSIX_VDISABLE
struct termios term; struct termios term;
#endif #endif
...@@ -2635,6 +2635,8 @@ int main(int argc, char *argv[]) ...@@ -2635,6 +2635,8 @@ int main(int argc, char *argv[])
reset_cursor(); reset_cursor();
while (1) { while (1) {
oldcurrent = current;
oldcurrent_x = current_x;
#ifndef DISABLE_MOUSE #ifndef DISABLE_MOUSE
currshortcut = main_list; currshortcut = main_list;
...@@ -2900,12 +2902,9 @@ int main(int argc, char *argv[]) ...@@ -2900,12 +2902,9 @@ int main(int argc, char *argv[])
} }
do_char(kbinput); do_char(kbinput);
} }
if (ISSET(CONSTUPDATE)) { if (ISSET(CONSTUPDATE))
if (ISSET(DISABLE_CURPOS)) if (current != oldcurrent || current_x != oldcurrent_x)
UNSET(DISABLE_CURPOS);
else
do_cursorpos(); do_cursorpos();
}
reset_cursor(); reset_cursor();
wrefresh(edit); wrefresh(edit);
......
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