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
da3a015f
Commit
da3a015f
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: reshuffle some lines and adjust some comments
parent
bc876ca7
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/move.c
+10
-14
src/move.c
with
10 additions
and
14 deletions
+10
-14
src/move.c
View file @
da3a015f
...
...
@@ -488,14 +488,12 @@ void do_up(bool scroll_only)
edit_scroll
(
UPWARD
,
(
ISSET
(
SMOOTH_SCROLL
)
||
scroll_only
)
?
1
:
editwinrows
/
2
+
1
);
/* If the lines weren't already redrawn, see if they need to be. */
if
(
openfile
->
current_y
>
0
)
{
/* Redraw the prior line if it's not actually the same line as the
* current one (which it might be in softwrap mode, if we moved just
* one chunk) and the line was horizontally scrolled. */
if
(
openfile
->
current
!=
was_current
&&
(
!
scroll_only
||
openfile
->
current_y
<
editwinrows
-
1
)
&&
line_needs_update
(
was_column
,
0
))
/* Redraw the prior line if it's not offscreen, and it's not the same
* line as the current one, and the line was horizontally scrolled. */
if
((
!
scroll_only
||
openfile
->
current_y
<
editwinrows
-
1
)
&&
openfile
->
current
!=
was_current
&&
line_needs_update
(
was_column
,
0
))
update_line
(
openfile
->
current
->
next
,
0
);
/* Redraw the current line if it needs to be horizontally scrolled. */
if
(
line_needs_update
(
0
,
xplustabs
()))
...
...
@@ -545,13 +543,11 @@ void do_down(bool scroll_only)
edit_scroll
(
DOWNWARD
,
(
ISSET
(
SMOOTH_SCROLL
)
||
scroll_only
)
?
1
:
editwinrows
/
2
+
1
);
/* If the lines weren't already redrawn, see if they need to be. */
if
(
openfile
->
current_y
<
editwinrows
-
1
)
{
/* Redraw the prior line if it's not actually the same line as the
* current one (which it might be in softwrap mode, if we moved just
* one chunk) and the line was horizontally scrolled. */
if
(
openfile
->
current
!=
was_current
&&
(
!
scroll_only
||
openfile
->
current_y
>
0
)
&&
/* Redraw the prior line if it's not offscreen, and it's not the same
* line as the current one, and the line was horizontally scrolled. */
if
((
!
scroll_only
||
openfile
->
current_y
>
0
)
&&
openfile
->
current
!=
was_current
&&
line_needs_update
(
was_column
,
0
))
update_line
(
openfile
->
current
->
prev
,
0
);
/* Redraw the current line if it needs to be horizontally scrolled. */
...
...
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