Skip to content
GitLab
Menu
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
ebbe5460
Commit
ebbe5460
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
screen: again, look at the bytes in their context
This avoids having to null-terminate every single-byte character.
parent
cf0eed6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+1
-8
src/winio.c
with
1 addition
and
8 deletions
+1
-8
src/winio.c
View file @
ebbe5460
...
...
@@ -1837,14 +1837,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
char
*
character
=
charalloc
(
mb_cur_max
());
int
charlen
,
i
;
#ifdef ENABLE_UTF8
/* Make sure an invalid sequence-starter byte is properly
* terminated, so that it doesn't pick up lingering bytes
* of any previous content. */
if
(
using_utf8
()
&&
buf_mb_len
==
1
)
buf_mb
[
1
]
=
'\0'
;
#endif
character
=
mbrep
(
buf_mb
,
character
,
&
charlen
);
character
=
mbrep
(
buf
+
start_index
,
character
,
&
charlen
);
for
(
i
=
0
;
i
<
charlen
;
i
++
)
converted
[
index
++
]
=
character
[
i
];
...
...
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