mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
remove do_(left|right)()'s ability to optionally not update the current
line, as this was only used in do_backspace(), and it didn't always update the screen properly git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
feb89db8a0
commit
1c3bfa9f2b
@ -158,6 +158,12 @@ CVS code -
|
||||
nano.texi, and nanorc.sample. (DLR, suggested by Mike
|
||||
Frysinger)
|
||||
- Update email address. Changes to faq.html and AUTHORS. (DLR)
|
||||
- Remove do_(left|right)()'s ability to optionally not update
|
||||
the current line, as this was only used in do_backspace(), and
|
||||
it didn't always update the screen properly. Changes to
|
||||
shortcut_init(), do_left(), do_right(), and do_backspace();
|
||||
removal of do_left_void() and do_right_void(). (DLR; problem
|
||||
found by Mike Frysinger)
|
||||
- color.c:
|
||||
- Remove unneeded fcntl.h include. (DLR)
|
||||
- chars.c:
|
||||
|
@ -497,11 +497,11 @@ void shortcut_init(bool unjustify)
|
||||
|
||||
sc_init_one(&main_list, NANO_FORWARD_KEY, N_("Forward"),
|
||||
IFHELP(nano_forward_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_right_void);
|
||||
NANO_NO_KEY, VIEW, do_right);
|
||||
|
||||
sc_init_one(&main_list, NANO_BACK_KEY, N_("Back"),
|
||||
IFHELP(nano_back_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_left_void);
|
||||
NANO_NO_KEY, VIEW, do_left);
|
||||
|
||||
sc_init_one(&main_list, NANO_HOME_KEY, N_("Home"),
|
||||
IFHELP(nano_home_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
|
18
src/move.c
18
src/move.c
@ -550,7 +550,7 @@ void do_down(void)
|
||||
}
|
||||
}
|
||||
|
||||
void do_left(bool allow_update)
|
||||
void do_left(void)
|
||||
{
|
||||
size_t pww_save = openfile->placewewant;
|
||||
|
||||
@ -566,16 +566,11 @@ void do_left(bool allow_update)
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
if (allow_update && need_horizontal_update(pww_save))
|
||||
if (need_horizontal_update(pww_save))
|
||||
update_line(openfile->current, openfile->current_x);
|
||||
}
|
||||
|
||||
void do_left_void(void)
|
||||
{
|
||||
do_left(TRUE);
|
||||
}
|
||||
|
||||
void do_right(bool allow_update)
|
||||
void do_right(void)
|
||||
{
|
||||
size_t pww_save = openfile->placewewant;
|
||||
|
||||
@ -593,11 +588,6 @@ void do_right(bool allow_update)
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
if (allow_update && need_horizontal_update(pww_save))
|
||||
if (need_horizontal_update(pww_save))
|
||||
update_line(openfile->current, openfile->current_x);
|
||||
}
|
||||
|
||||
void do_right_void(void)
|
||||
{
|
||||
do_right(TRUE);
|
||||
}
|
||||
|
@ -334,10 +334,8 @@ void do_home(void);
|
||||
void do_end(void);
|
||||
void do_up(void);
|
||||
void do_down(void);
|
||||
void do_left(bool allow_update);
|
||||
void do_left_void(void);
|
||||
void do_right(bool allow_update);
|
||||
void do_right_void(void);
|
||||
void do_left(void);
|
||||
void do_right(void);
|
||||
|
||||
/* Public functions in nano.c. */
|
||||
filestruct *make_new_node(filestruct *prevnode);
|
||||
|
@ -153,7 +153,7 @@ void do_backspace(void)
|
||||
{
|
||||
if (openfile->current != openfile->fileage ||
|
||||
openfile->current_x > 0) {
|
||||
do_left(FALSE);
|
||||
do_left();
|
||||
do_delete();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user