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
0f3e303d
Commit
0f3e303d
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: get rid of some spurious textual references to edit_refresh()
parent
c9680b8b
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/nano.c
+3
-4
src/nano.c
src/search.c
+2
-2
src/search.c
src/text.c
+2
-3
src/text.c
src/winio.c
+2
-2
src/winio.c
with
9 additions
and
11 deletions
+9
-11
src/nano.c
View file @
0f3e303d
...
...
@@ -1911,10 +1911,9 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
#endif
#ifndef DISABLE_WRAPPING
/* If we're wrapping text, we need to call edit_refresh(). */
if
(
!
ISSET
(
NO_WRAP
))
if
(
do_wrap
(
openfile
->
current
))
refresh_needed
=
TRUE
;
/* If text gets wrapped, the edit window needs a refresh. */
if
(
!
ISSET
(
NO_WRAP
)
&&
do_wrap
(
openfile
->
current
))
refresh_needed
=
TRUE
;
#endif
}
...
...
This diff is collapsed.
Click to expand it.
src/search.c
View file @
0f3e303d
...
...
@@ -734,8 +734,8 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
if
(
!
replaceall
)
{
#ifndef DISABLE_COLOR
/*
If color syntaxes are available and turned on, w
e
*
need to call edit_refresh()
. */
/*
When doing syntax coloring, the replacement might requir
e
*
a change of colors, so refresh the whole edit window
. */
if
(
openfile
->
colorstrings
!=
NULL
&&
!
ISSET
(
NO_COLOR_SYNTAX
))
edit_refresh
();
else
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
0f3e303d
...
...
@@ -2461,9 +2461,8 @@ void do_justify(bool full_justify)
}
else
openfile
->
current_x
=
strlen
(
openfile
->
current
->
data
);
/* Renumber the lines of the now-justified current paragraph,
* since both find_paragraph() and edit_refresh() need the line
* numbers to be right. */
/* Renumber the now-justified paragraph, since both refreshing the
* edit window and finding a paragraph need correct line numbers. */
renumber
(
curr_first_par_line
);
/* We've just finished justifying the paragraph. If we're not
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
0f3e303d
...
...
@@ -2996,7 +2996,7 @@ void edit_refresh(void)
if
(
openfile
->
current
->
lineno
<
openfile
->
edittop
->
lineno
||
openfile
->
current
->
lineno
>=
openfile
->
edittop
->
lineno
+
maxrows
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"edit
_
refresh
()
: line = %ld, edittop %ld
+
maxrows %d
\n
"
,
fprintf
(
stderr
,
"edit
-
refresh: line = %ld, edittop
=
%ld
and
maxrows
=
%d
\n
"
,
(
long
)
openfile
->
current
->
lineno
,
(
long
)
openfile
->
edittop
->
lineno
,
maxrows
);
#endif
adjust_viewport
((
focusing
||
!
ISSET
(
SMOOTH_SCROLL
))
?
CENTERING
:
STATIONARY
);
...
...
@@ -3005,7 +3005,7 @@ void edit_refresh(void)
foo
=
openfile
->
edittop
;
#ifdef DEBUG
fprintf
(
stderr
,
"edit
_
refresh
():
edittop
->lineno
= %ld
\n
"
,
(
long
)
openfile
->
edittop
->
lineno
);
fprintf
(
stderr
,
"edit
-
refresh
: now
edittop = %ld
\n
"
,
(
long
)
openfile
->
edittop
->
lineno
);
#endif
for
(
nlines
=
0
;
nlines
<
editwinrows
&&
foo
!=
NULL
;
nlines
++
)
{
...
...
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