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
ecc7c266
Commit
ecc7c266
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a variable, to have more contrast
parent
fbbf501f
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nano.c
+3
-3
src/nano.c
src/text.c
+3
-3
src/text.c
with
6 additions
and
6 deletions
+6
-6
src/nano.c
View file @
ecc7c266
...
...
@@ -1808,12 +1808,12 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
size_t
current_len
=
strlen
(
openfile
->
current
->
data
);
size_t
i
=
0
;
#ifndef NANO_TINY
size_t
orig_row
s
=
0
,
o
riginal_row
=
0
;
size_t
orig
inal
_row
=
0
,
o
ld_amount
=
0
;
if
(
ISSET
(
SOFTWRAP
))
{
if
(
openfile
->
current_y
==
editwinrows
-
1
)
original_row
=
chunk_for
(
xplustabs
(),
openfile
->
current
);
o
rig_rows
=
number_of_chunks_in
(
openfile
->
current
);
o
ld_amount
=
number_of_chunks_in
(
openfile
->
current
);
}
#endif
...
...
@@ -1878,7 +1878,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
* of the edit window, and we moved one screen row, we're now below
* the last line of the edit window, so we need a full refresh too. */
if
(
ISSET
(
SOFTWRAP
)
&&
refresh_needed
==
FALSE
&&
(
number_of_chunks_in
(
openfile
->
current
)
!=
o
rig_rows
||
(
number_of_chunks_in
(
openfile
->
current
)
!=
o
ld_amount
||
(
openfile
->
current_y
==
editwinrows
-
1
&&
chunk_for
(
xplustabs
(),
openfile
->
current
)
!=
original_row
)))
refresh_needed
=
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
ecc7c266
...
...
@@ -91,7 +91,7 @@ char *invocation_error(const char *name)
void
do_deletion
(
undo_type
action
)
{
#ifndef NANO_TINY
size_t
o
rig_rows
=
0
;
size_t
o
ld_amount
=
0
;
#endif
assert
(
openfile
->
current
!=
NULL
&&
openfile
->
current
->
data
!=
NULL
&&
...
...
@@ -112,7 +112,7 @@ void do_deletion(undo_type action)
update_undo
(
action
);
if
(
ISSET
(
SOFTWRAP
))
o
rig_rows
=
number_of_chunks_in
(
openfile
->
current
);
o
ld_amount
=
number_of_chunks_in
(
openfile
->
current
);
#endif
/* Move the remainder of the line "in", over the current character. */
...
...
@@ -181,7 +181,7 @@ void do_deletion(undo_type action)
/* If the number of screen rows that a softwrapped line occupies
* has changed, we need a full refresh. */
if
(
ISSET
(
SOFTWRAP
)
&&
refresh_needed
==
FALSE
&&
number_of_chunks_in
(
openfile
->
current
)
!=
o
rig_rows
)
number_of_chunks_in
(
openfile
->
current
)
!=
o
ld_amount
)
refresh_needed
=
TRUE
;
#endif
...
...
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