mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-24 19:36:52 +03:00
- nano.c:main() - Added var constcheck as a CRC-like check of whether cursor pos has changed and if so update the pos with -c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@820 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
66c33b8731
commit
b516d8e3f3
@ -44,7 +44,7 @@ CVS code -
|
||||
- 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).
|
||||
|
8
nano.c
8
nano.c
@ -2448,8 +2448,7 @@ int main(int argc, char *argv[])
|
||||
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;
|
||||
@ -2752,8 +2751,7 @@ int main(int argc, char *argv[])
|
||||
reset_cursor();
|
||||
|
||||
while (1) {
|
||||
oldcurrent = current;
|
||||
oldcurrent_x = current_x;
|
||||
constcheck = current->lineno + current_x + totsize;
|
||||
|
||||
#ifndef DISABLE_MOUSE
|
||||
currshortcut = main_list;
|
||||
@ -3035,7 +3033,7 @@ int main(int argc, char *argv[])
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user