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
a9f79a61
Commit
a9f79a61
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: reindent and rewrap a few lines, and shorten a comment
parent
115aeda6
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/chars.c
+3
-5
src/chars.c
src/winio.c
+3
-6
src/winio.c
with
6 additions
and
11 deletions
+6
-11
src/chars.c
View file @
a9f79a61
...
...
@@ -434,7 +434,7 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
(
*
col
)
++
;
ctrl_buf_mb
=
control_mbrep
(
buf
,
ctrl_buf_mb
,
&
ctrl_buf_mb_len
);
&
ctrl_buf_mb_len
);
*
col
+=
mbwidth
(
ctrl_buf_mb
);
...
...
@@ -459,10 +459,8 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
* current value of col. */
if
(
*
buf
==
'\t'
)
*
col
+=
tabsize
-
*
col
%
tabsize
;
/* If we have a control character, it's two columns wide:
* one column for the "^" that will be displayed in front of
* it, and one column for its visible equivalent as returned
* by control_mbrep(). */
/* If we have a control character, it's two columns wide: one
* column for the "^", and one for the visible character. */
else
if
(
is_cntrl_char
((
unsigned
char
)
*
buf
))
*
col
+=
2
;
/* If we have a normal character, it's one column wide. */
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
a9f79a61
...
...
@@ -1796,7 +1796,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
int
ctrl_buf_mb_len
,
i
;
ctrl_buf_mb
=
control_mbrep
(
buf_mb
,
ctrl_buf_mb
,
&
ctrl_buf_mb_len
);
&
ctrl_buf_mb_len
);
for
(
i
=
0
;
i
<
ctrl_buf_mb_len
;
i
++
)
converted
[
index
++
]
=
ctrl_buf_mb
[
i
];
...
...
@@ -1861,8 +1861,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
converted
[
index
++
]
=
'^'
;
start_col
++
;
ctrl_buf_mb
=
control_mbrep
(
buf_mb
,
ctrl_buf_mb
,
&
ctrl_buf_mb_len
);
ctrl_buf_mb
=
control_mbrep
(
buf_mb
,
ctrl_buf_mb
,
&
ctrl_buf_mb_len
);
for
(
i
=
0
;
i
<
ctrl_buf_mb_len
;
i
++
)
converted
[
index
++
]
=
ctrl_buf_mb
[
i
];
...
...
@@ -1896,9 +1895,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
if
(
using_utf8
()
&&
buf_mb_len
==
1
)
buf_mb
[
1
]
=
'\0'
;
#endif
nctrl_buf_mb
=
mbrep
(
buf_mb
,
nctrl_buf_mb
,
&
nctrl_buf_mb_len
);
nctrl_buf_mb
=
mbrep
(
buf_mb
,
nctrl_buf_mb
,
&
nctrl_buf_mb_len
);
for
(
i
=
0
;
i
<
nctrl_buf_mb_len
;
i
++
)
converted
[
index
++
]
=
nctrl_buf_mb
[
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
Menu
Projects
Groups
Snippets
Help