Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
d9aad921
Commit
d9aad921
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: elide a bit of code duplication
parent
8b636de1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/browser.c
+6
-10
src/browser.c
with
6 additions
and
10 deletions
+6
-10
src/browser.c
View file @
d9aad921
...
...
@@ -129,17 +129,13 @@ char *do_browser(char *path)
bottombars
(
MBROWSER
);
#ifndef NANO_TINY
/* If the window resized, also refresh the file list. */
if
(
kbinput
==
KEY_WINCH
)
{
/* Remember the selected file, to be able to reselect it. */
present_name
=
strdup
(
filelist
[
selected
]);
/* Reopen the current directory. */
dir
=
opendir
(
path
);
if
(
dir
!=
NULL
)
goto
read_directory_contents
;
statusline
(
ALERT
,
_
(
"Error reading %s: %s"
),
path
,
strerror
(
errno
));
kbinput
=
ERR
;
/* Reread the contents of the current directory. */
newpath
=
strdup
(
present_path
);
goto
read_directory_contents
;
}
#endif
/* Display (or redisplay) the file list if we don't have a key yet,
...
...
@@ -191,15 +187,15 @@ char *do_browser(char *path)
if
(
func
==
total_refresh
)
{
total_redraw
();
/* Simulate a window resize to force a directory reread. */
#ifndef NANO_TINY
/* Simulate a window resize to force a directory reread. */
kbinput
=
KEY_WINCH
;
#endif
}
else
if
(
func
==
do_help_void
)
{
#ifndef DISABLE_HELP
do_help_void
();
/* The window dimensions might have changed, so act as if. */
#ifndef NANO_TINY
/* The window dimensions might have changed, so act as if. */
kbinput
=
KEY_WINCH
;
#endif
#else
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment