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
582a6249
Commit
582a6249
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: frob some parentheses and other things, to be more consistent
parent
c7282e88
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/move.c
+5
-5
src/move.c
src/nano.c
+4
-4
src/nano.c
src/text.c
+3
-3
src/text.c
with
12 additions
and
12 deletions
+12
-12
src/move.c
View file @
582a6249
...
...
@@ -395,8 +395,8 @@ void do_home(bool be_clever)
openfile
->
placewewant
=
xplustabs
();
/* If we changed chunk, we might be offscreen. Otherwise,
update
* current if the mark is on or we changed "page". */
/* If we changed chunk, we might be offscreen. Otherwise,
*
update
current if the mark is on or we changed "page". */
if
(
ISSET
(
SOFTWRAP
)
&&
moved_off_chunk
)
{
focusing
=
FALSE
;
edit_redraw
(
was_current
);
...
...
@@ -426,8 +426,8 @@ void do_end(bool be_clever)
((
was_column
/
editwincols
)
*
editwincols
)
+
(
editwincols
-
1
));
/* If already at the right edge of the screen, move fully to
the
* end of the line. Otherwise, move to the right edge. */
/* If already at the right edge of the screen, move fully to
*
the
end of the line. Otherwise, move to the right edge. */
if
(
openfile
->
current_x
==
rightedge_x
&&
be_clever
)
openfile
->
current_x
=
line_len
;
else
{
...
...
@@ -587,7 +587,7 @@ void do_left(void)
* we're now above the first line of the edit window, so scroll up. */
if
(
ISSET
(
SOFTWRAP
)
&&
openfile
->
current_y
==
0
&&
openfile
->
current
==
was_current
&&
(
openfile
->
placewewant
/
editwincols
)
!=
was_chunk
)
{
openfile
->
placewewant
/
editwincols
!=
was_chunk
)
{
edit_scroll
(
UPWARD
,
ISSET
(
SMOOTH_SCROLL
)
?
1
:
editwinrows
/
2
+
1
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
582a6249
...
...
@@ -1891,11 +1891,11 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
* changed, we need a full refresh. And if we were on the last line
* 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
)
if
(
(
strlenpt
(
openfile
->
current
->
data
)
/
editwincols
)
!=
orig_rows
||
if
(
ISSET
(
SOFTWRAP
)
&&
refresh_needed
==
FALSE
&&
(
strlenpt
(
openfile
->
current
->
data
)
/
editwincols
!=
orig_rows
||
(
openfile
->
current_y
==
editwinrows
-
1
&&
xplustabs
()
/
editwincols
!=
original_row
))
refresh_needed
=
TRUE
;
xplustabs
()
/
editwincols
!=
original_row
))
)
refresh_needed
=
TRUE
;
#endif
free
(
char_buf
);
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
582a6249
...
...
@@ -181,9 +181,9 @@ void do_deletion(undo_type action)
#ifndef NANO_TINY
/* If the number of screen rows that a softwrapped line occupies
* has changed, we need a full refresh. */
if
(
ISSET
(
SOFTWRAP
)
&&
refresh_needed
==
FALSE
)
if
((
strlenpt
(
openfile
->
current
->
data
)
/
editwincols
)
!=
orig_rows
)
refresh_needed
=
TRUE
;
if
(
ISSET
(
SOFTWRAP
)
&&
refresh_needed
==
FALSE
&&
strlenpt
(
openfile
->
current
->
data
)
/
editwincols
!=
orig_rows
)
refresh_needed
=
TRUE
;
#endif
set_modified
();
...
...
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