| File ChangeLog changed (mode: 100644) (index befce3a93..924c75ffe) |
| 8 |
8 |
|
|
| 9 |
9 |
Slightly improve documentation of "columncount:" in 'lsoptions'. |
Slightly improve documentation of "columncount:" in 'lsoptions'. |
| 10 |
10 |
|
|
|
11 |
|
Avoid views scrolling unnecessarily in response to file-system changes |
|
12 |
|
that add or remove files before the first visible line. Thanks to |
|
13 |
|
justpretending2. |
|
14 |
|
|
| 11 |
15 |
Fixed `:highlight Group cterm=combine,none gui=combine,none` resulting in |
Fixed `:highlight Group cterm=combine,none gui=combine,none` resulting in |
| 12 |
16 |
`cterm=combine` and `gui=combine`. |
`cterm=combine` and `gui=combine`. |
| 13 |
17 |
|
|
| File src/filelist.c changed (mode: 100644) (index 4265eb699..d547940d7) |
| ... |
... |
merge_lists(view_t *view, dir_entry_t *entries, int len) |
| 2445 |
2445 |
int i; |
int i; |
| 2446 |
2446 |
int closest_dist; |
int closest_dist; |
| 2447 |
2447 |
const int prev_pos = view->list_pos; |
const int prev_pos = view->list_pos; |
|
2448 |
|
const int top_delta = view->list_pos - view->top_line; |
| 2448 |
2449 |
trie_t *prev_names = trie_create(/*free_func=*/NULL); |
trie_t *prev_names = trie_create(/*free_func=*/NULL); |
| 2449 |
2450 |
|
|
| 2450 |
2451 |
for(i = 0; i < len; ++i) |
for(i = 0; i < len; ++i) |
| |
| ... |
... |
merge_lists(view_t *view, dir_entry_t *entries, int len) |
| 2477 |
2478 |
closest_dist = correct_pos(view, i, dist, closest_dist); |
closest_dist = correct_pos(view, i, dist, closest_dist); |
| 2478 |
2479 |
} |
} |
| 2479 |
2480 |
|
|
|
2481 |
|
/* When possible, preserve relative placement of the current entry in the |
|
2482 |
|
* view. Drawing code should handle out-of-range values (e.g., negative ones) |
|
2483 |
|
* fine. */ |
|
2484 |
|
view->top_line = view->list_pos - top_delta; |
|
2485 |
|
|
| 2480 |
2486 |
trie_free(prev_names); |
trie_free(prev_names); |
| 2481 |
2487 |
} |
} |
| 2482 |
2488 |
|
|
| File tests/misc/flist_reload.c changed (mode: 100644) (index 85e48f352..d0478c80e) |
| ... |
... |
TEST(selection_is_preserved) |
| 99 |
99 |
assert_int_equal(2, view->selected_files); |
assert_int_equal(2, view->selected_files); |
| 100 |
100 |
} |
} |
| 101 |
101 |
|
|
|
102 |
|
TEST(top_line_is_not_shifted_unnecessarily) |
|
103 |
|
{ |
|
104 |
|
view->window_rows = 4; |
|
105 |
|
view->top_line = 2; |
|
106 |
|
view->list_pos = 3; |
|
107 |
|
remove_dir("0"); |
|
108 |
|
remove_dir("1"); |
|
109 |
|
|
|
110 |
|
assert_string_equal("2", view->dir_entry[view->top_line].name); |
|
111 |
|
assert_string_equal("3", view->dir_entry[view->list_pos].name); |
|
112 |
|
|
|
113 |
|
populate_dir_list(view, /*reload=*/1); |
|
114 |
|
|
|
115 |
|
assert_int_equal(0, view->top_line); |
|
116 |
|
assert_int_equal(1, view->list_pos); |
|
117 |
|
assert_string_equal("2", view->dir_entry[view->top_line].name); |
|
118 |
|
assert_string_equal("3", view->dir_entry[view->list_pos].name); |
|
119 |
|
} |
|
120 |
|
|
| 102 |
121 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
| 103 |
122 |
/* vim: set cinoptions+=t0 filetype=c : */ |
/* vim: set cinoptions+=t0 filetype=c : */ |