mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
buffer.c: remove useless 'for' loops.
This commit is contained in:
@@ -4482,22 +4482,15 @@ int build_stl_str_hl(
|
|||||||
int num_separators = 0;
|
int num_separators = 0;
|
||||||
for (int i = 0; i < itemcnt; i++) {
|
for (int i = 0; i < itemcnt; i++) {
|
||||||
if (stl_items[i].type == Separate) {
|
if (stl_items[i].type == Separate) {
|
||||||
|
// Create an array of the start location for each
|
||||||
|
// separator mark.
|
||||||
|
stl_separator_locations[num_separators] = i;
|
||||||
num_separators++;
|
num_separators++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have separated groups, then we deal with it now
|
// If we have separated groups, then we deal with it now
|
||||||
if (num_separators) {
|
if (num_separators) {
|
||||||
// Create an array of the start location for each
|
|
||||||
// separator mark.
|
|
||||||
int index = 0;
|
|
||||||
for (int i = 0; i < itemcnt; i++) {
|
|
||||||
if (stl_items[i].type == Separate) {
|
|
||||||
stl_separator_locations[index] = i;
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int standard_spaces = (maxwidth - width) / num_separators;
|
int standard_spaces = (maxwidth - width) / num_separators;
|
||||||
int final_spaces = (maxwidth - width) -
|
int final_spaces = (maxwidth - width) -
|
||||||
standard_spaces * (num_separators - 1);
|
standard_spaces * (num_separators - 1);
|
||||||
|
Reference in New Issue
Block a user