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).
|
- Initialize totsize (DLR).
|
||||||
- nano.c:
|
- nano.c:
|
||||||
main()
|
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.
|
pos has changed and if so update the pos with -c.
|
||||||
- Many tweaks and changes from numerics to char equivs
|
- Many tweaks and changes from numerics to char equivs
|
||||||
(David Lawrence Ramsey).
|
(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 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 */
|
long constcheck; /* Check to constantly update */
|
||||||
int oldcurrent_x; /* Same */
|
|
||||||
|
|
||||||
#ifdef _POSIX_VDISABLE
|
#ifdef _POSIX_VDISABLE
|
||||||
struct termios term;
|
struct termios term;
|
||||||
@ -2752,8 +2751,7 @@ int main(int argc, char *argv[])
|
|||||||
reset_cursor();
|
reset_cursor();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
oldcurrent = current;
|
constcheck = current->lineno + current_x + totsize;
|
||||||
oldcurrent_x = current_x;
|
|
||||||
|
|
||||||
#ifndef DISABLE_MOUSE
|
#ifndef DISABLE_MOUSE
|
||||||
currshortcut = main_list;
|
currshortcut = main_list;
|
||||||
@ -3035,7 +3033,7 @@ int main(int argc, char *argv[])
|
|||||||
if (ISSET(DISABLE_CURPOS))
|
if (ISSET(DISABLE_CURPOS))
|
||||||
UNSET(DISABLE_CURPOS);
|
UNSET(DISABLE_CURPOS);
|
||||||
else if (ISSET(CONSTUPDATE))
|
else if (ISSET(CONSTUPDATE))
|
||||||
if (current != oldcurrent || current_x != oldcurrent_x)
|
if (constcheck != current->lineno + current_x + totsize)
|
||||||
do_cursorpos();
|
do_cursorpos();
|
||||||
|
|
||||||
reset_cursor();
|
reset_cursor();
|
||||||
|
Loading…
Reference in New Issue
Block a user