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
59b9b222
Commit
59b9b222
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
moving: ignore any number when ^Y or ^V is given
This fixes
https://savannah.gnu.org/bugs/?48282
.
parent
79e3eaf7
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/search.c
+7
-6
src/search.c
with
7 additions
and
6 deletions
+7
-6
src/search.c
View file @
59b9b222
...
@@ -912,7 +912,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
...
@@ -912,7 +912,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
/* TRANSLATORS: This is a prompt. */
/* TRANSLATORS: This is a prompt. */
edit_refresh
,
_
(
"Enter line number, column number"
));
edit_refresh
,
_
(
"Enter line number, column number"
));
/*
C
ancel
,
or
Enter with blank string
. */
/*
If the user c
ancel
led
or
gave a blank answer, get out
. */
if
(
i
<
0
)
{
if
(
i
<
0
)
{
statusbar
(
_
(
"Cancelled"
));
statusbar
(
_
(
"Cancelled"
));
return
;
return
;
...
@@ -921,20 +921,21 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
...
@@ -921,20 +921,21 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
func
=
func_from_key
(
&
i
);
func
=
func_from_key
(
&
i
);
if
(
func
==
gototext_void
)
{
if
(
func
==
gototext_void
)
{
/*
Keep answer up on the statusbar
. */
/*
Retain what the user typed so far and switch to searching
. */
search_init
(
TRUE
,
TRUE
);
search_init
(
TRUE
,
TRUE
);
do_search
();
do_search
();
return
;
}
}
/* If a function was executed, we're done here. */
if
(
i
>
0
)
return
;
/* Do a bounds check. Display a warning on an out-of-bounds
/* Do a bounds check. Display a warning on an out-of-bounds
* line or column number only if we hit Enter at the statusbar
* line or column number only if we hit Enter at the statusbar
* prompt. */
* prompt. */
if
(
!
parse_line_column
(
answer
,
&
line
,
&
column
)
||
if
(
!
parse_line_column
(
answer
,
&
line
,
&
column
)
||
line
<
1
||
column
<
1
)
{
line
<
1
||
column
<
1
)
{
if
(
i
==
0
)
statusbar
(
_
(
"Invalid line or column number"
));
statusbar
(
_
(
"Invalid line or column number"
));
return
;
return
;
}
}
}
else
{
}
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