aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-16 22:14:28 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-12-19 11:43:21 +0100
commit7f6b775b45de5011ff1c44e63e57551566d80704 (patch)
tree54eab8482051d2d1a958fcf9f6c9bcbb02827717 /src/nvim/change.c
parent693aea0e9e1032aee85d56c1a3f33e0811dbdc18 (diff)
downloadrneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.gz
rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.bz2
rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.zip
refactor: use `bool` to represent boolean values
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r--src/nvim/change.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 622eb3b9a5..99698f2e5d 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -1322,7 +1322,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment)
char *comment_end = NULL; // where lead_end has been found
int extra_space = false; // append extra space
int current_flag;
- int require_blank = false; // requires blank after middle
+ bool require_blank = false; // requires blank after middle
char *p2;
// If the comment leader has the start, middle or end flag, it may not
@@ -1979,7 +1979,7 @@ void del_lines(linenr_T nlines, bool undo)
int get_leader_len(char *line, char **flags, bool backward, bool include_space)
{
int j;
- int got_com = false;
+ bool got_com = false;
char part_buf[COM_MAX_LEN]; // buffer for one option part
char *string; // pointer to comment string
int middle_match_len = 0;
@@ -1994,7 +1994,7 @@ int get_leader_len(char *line, char **flags, bool backward, bool include_space)
// Repeat to match several nested comment strings.
while (line[i] != NUL) {
// scan through the 'comments' option for a match
- int found_one = false;
+ bool found_one = false;
for (char *list = curbuf->b_p_com; *list;) {
// Get one option part into part_buf[]. Advance "list" to next
// one. Put "string" at start of string.
@@ -2129,7 +2129,7 @@ int get_last_leader_offset(char *line, char **flags)
int i = (int)strlen(line);
while (--i >= lower_check_bound) {
// scan through the 'comments' option for a match
- int found_one = false;
+ bool found_one = false;
for (char *list = curbuf->b_p_com; *list;) {
char *flags_save = list;