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
0ae80ce3
Commit
0ae80ce3
authored
6 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: reduce two parameters to a single one by summing them
Also, rename the remaining parameter and rename a variable.
parent
0c42c51a
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/text.c
+9
-9
src/text.c
with
9 additions
and
9 deletions
+9
-9
src/text.c
View file @
0ae80ce3
...
...
@@ -3042,19 +3042,19 @@ void do_verbatim_input(void)
#ifdef ENABLE_WORDCOMPLETION
/* Return a copy of the found completion candidate. */
char
*
copy_completion
(
char
*
check_line
,
size_t
star
t
)
char
*
copy_completion
(
char
*
tex
t
)
{
char
*
word
;
size_t
afterit
=
start
,
index
=
0
;
size_t
length
=
0
,
index
=
0
;
/* Find the
position where
the candidate word
ends
. */
while
(
is_word_mbchar
(
&
check_line
[
afterit
],
FALSE
))
afterit
=
move_mbright
(
check_line
,
afterit
);
/* Find the
end of
the candidate word
to get its length
. */
while
(
is_word_mbchar
(
&
text
[
length
],
FALSE
))
length
=
move_mbright
(
text
,
length
);
/* Now copy this candidate to a new string. */
word
=
charalloc
(
afterit
-
start
+
1
);
while
(
start
<
afterit
)
word
[
index
++
]
=
check_line
[
star
t
++
]
;
word
=
charalloc
(
length
+
1
);
while
(
index
<
length
)
word
[
index
++
]
=
*
(
tex
t
++
)
;
word
[
index
]
=
'\0'
;
return
word
;
...
...
@@ -3156,7 +3156,7 @@ void complete_a_word(void)
i
==
openfile
->
current_x
-
shard_length
)
continue
;
completion
=
copy_completion
(
pletion_line
->
data
,
i
);
completion
=
copy_completion
(
pletion_line
->
data
+
i
);
/* Look among earlier attempted completions for a duplicate. */
some_word
=
list_of_completions
;
...
...
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