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
a850bb25
Commit
a850bb25
authored
7 years ago
by
David Lawrence Ramsey
Committed by
Benno Schulenberg
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
moving: redraw not just the new current line but also the prior one
This fixes
http://savannah.gnu.org/bugs/?51821
.
parent
047cf9be
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/move.c
+10
-10
src/move.c
with
10 additions
and
10 deletions
+10
-10
src/move.c
View file @
a850bb25
...
...
@@ -463,6 +463,7 @@ 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
leftedge
,
target_column
;
/* When just scrolling and the top of the file is onscreen, get out. */
...
...
@@ -482,7 +483,7 @@ void do_up(bool scroll_only)
if
(
scroll_only
)
edit_scroll
(
UPWARD
,
1
);
edit_redraw
(
openfile
->
current
,
FLOWING
);
edit_redraw
(
was_
current
,
FLOWING
);
/* <Up> should not change placewewant, so restore it. */
openfile
->
placewewant
=
leftedge
+
target_column
;
...
...
@@ -492,6 +493,7 @@ void do_up(bool scroll_only)
* scroll the screen one row, so the cursor stays in the same spot. */
void
do_down
(
bool
scroll_only
)
{
filestruct
*
was_current
=
openfile
->
current
;
size_t
leftedge
,
target_column
;
get_edge_and_target
(
&
leftedge
,
&
target_column
);
...
...
@@ -506,7 +508,7 @@ void do_down(bool scroll_only)
if
(
scroll_only
)
edit_scroll
(
DOWNWARD
,
1
);
edit_redraw
(
openfile
->
current
,
FLOWING
);
edit_redraw
(
was_
current
,
FLOWING
);
/* <Down> should not change placewewant, so restore it. */
openfile
->
placewewant
=
leftedge
+
target_column
;
...
...
@@ -541,33 +543,31 @@ void do_scroll_down(void)
/* Move left one character. */
void
do_left
(
void
)
{
filestruct
*
was_current
=
openfile
->
current
;
if
(
openfile
->
current_x
>
0
)
openfile
->
current_x
=
move_mbleft
(
openfile
->
current
->
data
,
openfile
->
current_x
);
else
if
(
openfile
->
current
!=
openfile
->
fileage
)
{
openfile
->
current
=
openfile
->
current
->
prev
;
openfile
->
current_x
=
strlen
(
openfile
->
current
->
data
);
edit_redraw
(
openfile
->
current
->
next
,
FLOWING
);
return
;
}
edit_redraw
(
openfile
->
current
,
FLOWING
);
edit_redraw
(
was_
current
,
FLOWING
);
}
/* Move right one character. */
void
do_right
(
void
)
{
filestruct
*
was_current
=
openfile
->
current
;
if
(
openfile
->
current
->
data
[
openfile
->
current_x
]
!=
'\0'
)
openfile
->
current_x
=
move_mbright
(
openfile
->
current
->
data
,
openfile
->
current_x
);
else
if
(
openfile
->
current
!=
openfile
->
filebot
)
{
openfile
->
current
=
openfile
->
current
->
next
;
openfile
->
current_x
=
0
;
edit_redraw
(
openfile
->
current
->
prev
,
FLOWING
);
return
;
}
edit_redraw
(
openfile
->
current
,
FLOWING
);
edit_redraw
(
was_
current
,
FLOWING
);
}
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