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
2f80193d
Commit
2f80193d
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: reshuffle a test to a better place
parent
23595c83
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/winio.c
+7
-11
src/winio.c
with
7 additions
and
11 deletions
+7
-11
src/winio.c
View file @
2f80193d
...
...
@@ -2509,31 +2509,27 @@ void edit_draw(filestruct *fileptr, const char *converted,
/* If there is no end, there is nothing to paint. */
if
(
end_line
==
NULL
)
goto
tail_of_loop
;
/* If the end is scrolled off to the left, next step. */
if
(
end_line
==
fileptr
&&
endmatch
.
rm_eo
<=
from_x
)
{
fileptr
->
multidata
[
varnish
->
id
]
=
CBEGINBEFORE
;
goto
step_two
;
}
/* Now paint the start of the line. However, if the end match
* is on a different line, paint the whole line, and go on. */
/* If the end is on a later line, paint whole line, and be done. */
if
(
end_line
!=
fileptr
)
{
mvwaddnstr
(
edit
,
row
,
margin
,
converted
,
-
1
);
fileptr
->
multidata
[
varnish
->
id
]
=
CWHOLELINE
;
#ifdef DEBUG
fprintf
(
stderr
,
" Marking for id %i row %i as CWHOLELINE
\n
"
,
varnish
->
id
,
row
);
#endif
/* Don't bother looking for any more starts. */
goto
tail_of_loop
;
}
else
{
}
/* Only if it is visible, paint the part to be coloured. */
if
(
endmatch
.
rm_eo
>
from_x
)
{
paintlen
=
actual_x
(
converted
,
strnlenpt
(
fileptr
->
data
,
endmatch
.
rm_eo
)
-
from_col
);
mvwaddnstr
(
edit
,
row
,
margin
,
converted
,
paintlen
);
fileptr
->
multidata
[
varnish
->
id
]
=
CBEGINBEFORE
;
}
fileptr
->
multidata
[
varnish
->
id
]
=
CBEGINBEFORE
;
#ifdef DEBUG
fprintf
(
stderr
,
" Marking for id %i row %i as CBEGINBEFORE
\n
"
,
varnish
->
id
,
row
);
#endif
}
step_two:
/* Second step: look for starts on this line, but begin
* looking only after an end match, if there is one. */
...
...
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