mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
browser: make the keystrokes ^W^Y and ^W^V work again
The functions to_first_file() and to_last_file() can get called from
do_statusbar_input(), which is called indirectly from do_prompt(),
and are expected to make the corresponding adjustment.
This fixes https://savannah.gnu.org/bugs/?61273.
Bug existed since version 5.0, commit 07c1ac90
.
This commit is contained in:
parent
2f216281e7
commit
508301a2ef
@ -359,6 +359,7 @@ void search_filename(bool forwards)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (response == 0 || response == -2)
|
||||
findfile(last_search, forwards);
|
||||
}
|
||||
|
||||
@ -380,6 +381,18 @@ void research_filename(bool forwards)
|
||||
}
|
||||
}
|
||||
|
||||
/* Select the first file in the list -- called by ^W^Y. */
|
||||
void to_first_file(void)
|
||||
{
|
||||
selected = 0;
|
||||
}
|
||||
|
||||
/* Select the last file in the list -- called by ^W^V. */
|
||||
void to_last_file(void)
|
||||
{
|
||||
selected = list_length - 1;
|
||||
}
|
||||
|
||||
/* Strip one element from the end of path, and return the stripped path.
|
||||
* The returned string is dynamically allocated, and should be freed. */
|
||||
char *strip_last_component(const char *path)
|
||||
|
@ -301,12 +301,6 @@ void flip_goto(void)
|
||||
void to_files(void)
|
||||
{
|
||||
}
|
||||
void to_first_file(void)
|
||||
{
|
||||
}
|
||||
void to_last_file(void)
|
||||
{
|
||||
}
|
||||
void goto_dir(void)
|
||||
{
|
||||
}
|
||||
|
@ -191,6 +191,8 @@ typedef void (*functionptrtype)(void);
|
||||
#ifdef ENABLE_BROWSER
|
||||
void browser_refresh(void);
|
||||
char *browse_in(const char *inpath);
|
||||
void to_first_file(void);
|
||||
void to_last_file(void);
|
||||
#endif
|
||||
|
||||
/* Most functions in chars.c. */
|
||||
@ -636,8 +638,6 @@ void flip_replace(void);
|
||||
void flip_goto(void);
|
||||
#ifdef ENABLE_BROWSER
|
||||
void to_files(void);
|
||||
void to_first_file(void);
|
||||
void to_last_file(void);
|
||||
void goto_dir(void);
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
|
Loading…
Reference in New Issue
Block a user