in do_insertfile(), when inserting a file in non-multibuffer mode,
preserve placewewant as well as current_x, for compatibility with Pico git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
@@ -540,7 +540,8 @@ void do_insertfile(
|
||||
statusbar(_("Cancelled"));
|
||||
break;
|
||||
} else {
|
||||
int old_current_x = current_x;
|
||||
size_t old_current_x = current_x;
|
||||
size_t old_pww = placewewant;
|
||||
|
||||
ans = mallocstrcpy(ans, answer);
|
||||
|
||||
@@ -596,8 +597,9 @@ void do_insertfile(
|
||||
/* Mark the file as modified. */
|
||||
set_modified();
|
||||
|
||||
/* Restore the old x-coordinate position. */
|
||||
/* Restore the old cursor position. */
|
||||
current_x = old_current_x;
|
||||
placewewant = old_pww;
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user