* (vfs_dirent_assign): set d_len up.
* (mc_readdir): sync with new vfs_dirent: use d_len member.
* (filename_completion_function): likewise.
* (handle_dirent): likewise.
* (find_ignore_dir_search): add 2nd argument to use length of
directory name if it's known.
* (do_search): sync with modified vfs_dirent and find_ignore_dir_search().
* (NLENGTH): remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add new item to a listbox taking ownerhip of item text
and avoid a string duplication.
(listbox_add_item): reimplement using listbox_add_item_take().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Steps to reproduce:
1. Create file owth a space in the name:
touch "a b"
There should no other files with name begins with "a" in the directory.
2. Press Shift-F4 to open editor
3. Press Shift-F2 to display dialog window "Save as..."
4. Press Esc+Tab to fill an input line
Result:
a\ b will appear in the edit field.
If you attempt to save the file, the back slash will be in the filename.
Expected result:
no any extra back slashes in the file name.
Soution: escape only '?', '*', and '&' symbols as described in the
manual page (see a11995e12b).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (simple_status_msg_init_cb): pass NULL instead of "" to label_new()
to get rid of an empty string duplication.
* (advanced_chown_dlg_create): likewise.
* (chown_dlg_create): likewise.
* (dirsize_status_init_cb): likewise.
* (file_op_context_create_ui): likewise.
* (setup_gui): likewise.
* (init_hotlist): likewise.
* (init_learn): likewise.
* (file_progress_show_source): pass NULL instead of "" to
label_set_text() to get rid of an empty string duplication.
* (file_progress_show_target): likewise.
* (create_file_manager): pass NULL instead of 0 to label_new().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Found via `codespell -S
po,doc,./misc/syntax,./src/vfs/extfs/helpers/README.it -L
parm,rouge,sav,ect,vie,te,dum,clen,wee,dynamc,childs,ths,fo,nin,unx,nd,iif,iterm,ser,makrs,wil`
Co-authored-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Kian-Meng Ang <kianmeng@cpan.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
../../../lib/widget/input.c:573:8: error: 'event_data.ret' may be used uninitialized [-Werror=maybe-uninitialized]
573 | if (event_data.ret)
| ^
../../../lib/widget/input.c:566:35: note: 'event_data.ret' was declared here
566 | ev_clipboard_text_from_file_t event_data;
Found by gcc-11.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Use it instead of direct access to WInput's buffer.
(handle_cmdline_enter): additional minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (input_get_text): never return NULL. If buffer is empty, return an
empty allocated string.
* (input_push_history): use new input_get_text.
* (find_parameters): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If dialog should be placed too high (in the upper half of the screen
closer to the screen top), show it centered.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>