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
fc367a32
Commit
fc367a32
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
moving: don't push x forward when backward movement lands on a split tab
This fixes
https://savannah.gnu.org/bugs/?51809
.
parent
5e105287
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/move.c
+2
-7
src/move.c
with
2 additions
and
7 deletions
+2
-7
src/move.c
View file @
fc367a32
...
...
@@ -103,7 +103,7 @@ void do_page_up(void)
}
openfile
->
placewewant
=
leftedge
+
target_column
;
openfile
->
current_x
=
proper
_x
(
openfile
->
current
->
data
,
leftedge
,
openfile
->
current_x
=
actual
_x
(
openfile
->
current
->
data
,
actual_last_column
(
leftedge
,
target_column
));
/* Move the viewport so that the cursor stays immobile, if possible. */
...
...
@@ -461,8 +461,6 @@ void do_end(void)
* also scroll the screen one row, so the cursor stays in the same spot. */
void
do_up
(
bool
scroll_only
)
{
filestruct
*
was_current
=
openfile
->
current
;
size_t
was_x
=
openfile
->
current_x
;
size_t
leftedge
,
target_column
;
/* When just scrolling and the top of the file is onscreen, get out. */
...
...
@@ -476,10 +474,8 @@ void do_up(bool scroll_only)
if
(
go_back_chunks
(
1
,
&
openfile
->
current
,
&
leftedge
)
>
0
)
return
;
openfile
->
current_x
=
proper
_x
(
openfile
->
current
->
data
,
leftedge
,
openfile
->
current_x
=
actual
_x
(
openfile
->
current
->
data
,
actual_last_column
(
leftedge
,
target_column
));
if
(
openfile
->
current
==
was_current
&&
openfile
->
current_x
==
was_x
)
openfile
->
current_x
--
;
if
(
scroll_only
)
edit_scroll
(
UPWARD
,
1
);
...
...
@@ -488,7 +484,6 @@ void do_up(bool scroll_only)
/* <Up> should not change placewewant, so restore it. */
openfile
->
placewewant
=
leftedge
+
target_column
;
}
/* Move the cursor to next line or chunk. If scroll_only is TRUE, also
...
...
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