Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
e6350aab
Commit
e6350aab
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
prompt: do not treat a leading newline in a filename specially
This fixes
https://savannah.gnu.org/bugs/?49884
.
parent
8bf8682b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/browser.c
+1
-3
src/browser.c
src/files.c
+3
-7
src/files.c
with
4 additions
and
10 deletions
+4
-10
src/browser.c
View file @
e6350aab
...
...
@@ -230,9 +230,7 @@ char *do_browser(char *path)
/* TRANSLATORS: This is a prompt. */
browser_refresh
,
_
(
"Go To Directory"
));
/* If the directory begins with a newline (i.e. an
* encoded null), treat it as though it's blank. */
if
(
i
<
0
||
*
answer
==
'\n'
)
{
if
(
i
<
0
)
{
statusbar
(
_
(
"Cancelled"
));
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
src/files.c
View file @
e6350aab
...
...
@@ -1098,10 +1098,8 @@ void do_insertfile(void)
"./"
);
/* If we're in multibuffer mode and the filename or command is
* blank, open a new buffer instead of canceling. If the
* filename or command begins with a newline (i.e. an encoded
* null), treat it as though it's blank. */
if
(
i
==
-
1
||
(
!
ISSET
(
MULTIBUFFER
)
&&
(
i
==
-
2
||
*
answer
==
'\n'
)))
{
* blank, open a new buffer instead of canceling. */
if
(
i
==
-
1
||
(
i
==
-
2
&&
!
ISSET
(
MULTIBUFFER
)))
{
statusbar
(
_
(
"Cancelled"
));
break
;
}
else
{
...
...
@@ -2236,9 +2234,7 @@ int do_writeout(bool exiting)
#endif
);
/* If the filename or command begins with a newline (i.e. an
* encoded null), treat it as though it's blank. */
if
(
i
<
0
||
*
answer
==
'\n'
)
{
if
(
i
<
0
)
{
statusbar
(
_
(
"Cancelled"
));
break
;
}
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
Menu
Projects
Groups
Snippets
Help