xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 2aaa876822cf9307dd4da937ffb2ba7f5c1bc71f

Fix cursor update after :mkdir/:touch and a move
This is another consequence of 80b6e1f8be4421d51c07fff9fcd0c7f5ccb6f5c4:

Fewer screen updates related to cursor position

Do nothing if we have just displayed the position.

Also add a NULL check, misc tests crashed and the application could
probably crash as well.
Author: xaizek
Author date (UTC): 2019-07-13 11:25
Committer name: xaizek
Committer date (UTC): 2019-07-13 11:29
Parent(s): 02017f1cf55eb0d518850fb37b7171af262d13b6
Signing key: 99DC5E4DB05F6BE2
Tree: 7af573e53d0df1bb0a0c699f6f6fef80d350b1eb
File Lines added Lines deleted
src/ui/fileview.c 6 1
File src/ui/fileview.c changed (mode: 100644) (index 2ba65b115..752457217)
... ... redraw_view(view_t *view)
802 802 if(curr_stats.need_update == UT_NONE && !curr_stats.restart_in_progress && if(curr_stats.need_update == UT_NONE && !curr_stats.restart_in_progress &&
803 803 window_shows_dirlist(view)) window_shows_dirlist(view))
804 804 { {
805 /* Make sure cursor is visible and relevant part of the view is displayed. */
805 /* Make sure cursor is visible and relevant part of the view is
806 * displayed. */
806 807 (void)move_curr_line(view); (void)move_curr_line(view);
808 /* Update cursor position cache as it might have been moved outside this
809 * unit. */
810 (void)cache_cursor_pos(view);
807 811 /* And then redraw the view unconditionally as requested. */ /* And then redraw the view unconditionally as requested. */
808 812 draw_dir_list(view); draw_dir_list(view);
809 813 } }
 
... ... cache_cursor_pos(view_t *view)
1840 1844
1841 1845 if(view->list_pos == view->last_seen_pos && if(view->list_pos == view->last_seen_pos &&
1842 1846 view->curr_line == view->last_curr_line && view->curr_line == view->last_curr_line &&
1847 view->last_curr_file != NULL &&
1843 1848 strcmp(view->last_curr_file, path) == 0) strcmp(view->last_curr_file, path) == 0)
1844 1849 { {
1845 1850 return 1; return 1;
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master