Preserving the cursor position on the statusbar when just toggling
a setting or making an excursion to the file browser. This fixes Savannah bug #46945. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
a68e1627dc
commit
aa7edb7fc2
|
@ -1,3 +1,8 @@
|
||||||
|
2016-01-21 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
* src/prompt.c (get_prompt_string): Preserve the cursor position on
|
||||||
|
the statusbar when just toggling a setting or making an excursion to
|
||||||
|
the file browser. This fixes Savannah bug #46945.
|
||||||
|
|
||||||
2016-01-20 Benno Schulenberg <bensberg@justemail.net>
|
2016-01-20 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/files.c (open_buffer): Readjust the indentation and a comment.
|
* src/files.c (open_buffer): Readjust the indentation and a comment.
|
||||||
* src/files.c (has_valid_path): Get rid of a global variable.
|
* src/files.c (has_valid_path): Get rid of a global variable.
|
||||||
|
|
21
src/prompt.c
21
src/prompt.c
|
@ -922,22 +922,11 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* We've finished putting in an answer or run a normal shortcut's
|
/* If we're done with this prompt, restore the cursor position
|
||||||
* associated function, so reset statusbar_x and statusbar_pww. If
|
* to what it was at the /previous/ prompt, in case there was. */
|
||||||
* we've finished putting in an answer, reset the statusbar cursor
|
if (func == do_cancel || func == do_enter) {
|
||||||
* position too. */
|
statusbar_x = old_statusbar_x;
|
||||||
if (func) {
|
statusbar_pww = old_pww;
|
||||||
if (func == do_cancel || func == do_enter || ran_func) {
|
|
||||||
statusbar_x = old_statusbar_x;
|
|
||||||
statusbar_pww = old_pww;
|
|
||||||
|
|
||||||
if (!ran_func)
|
|
||||||
reset_statusbar_x = TRUE;
|
|
||||||
/* Otherwise, we're still putting in an answer or a shortcut with
|
|
||||||
* an associated function, so leave the statusbar cursor position
|
|
||||||
* alone. */
|
|
||||||
} else
|
|
||||||
reset_statusbar_x = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*actual = kbinput;
|
*actual = kbinput;
|
||||||
|
|
Loading…
Reference in New Issue