Previous solutions have broken one of the viewer features (http://www.midnight-commander.org/ticket/1778)
What suggest is fixing PgDn in a way, that it switches to one-line mode after EOF and add a check to ensure,
that at least one last line stays visible (4.7.1 behaviour of end/pgdn was irritating indeed).
With this patch, PageDown at the last page scrolls file line by line instead of entire page.
This is feature, not a bug. :)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 2407_find_file_segfault:
Some fixes in EN and RU man pages.
Change hotkey for "Search for content" and "All charsets" checkboxes
Ticket #2407: crash of mc when chdir to find file.
Typing 'u' in "User defined mode" input line, the "User defined"
radio-button is checked instead of putting the 'u' letter
into the input line.
Bug was introduced in 80d34ca625.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 2046_find_file:
Applied MC indentation policy
Fixed up several comments
Optimization: don't process search handlers too often
Optimization: don't destroy the "Find file" dialog before call "Tree" one
Content search options can be disabled using "Search for content" checkbox
Reorganized "Find File" checkboxes
Take into account the value of the "Search for content" checkbox
Ticket #2046: Added "Search for content" checkbox to the Find File dialog
Miscellaneous changes:
* Create search handlers before search session and destroy afterwards.
* Get rid of goto operator in do_search() functon.
* Fixed handling of DLG_VALIDATE message.
* Type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Made "Find recursively" and "Search for content" appear the
first, as they are completely logically independent and influence the
way the strings entered in the corresponding fields are used.
"Using shell patterns" and "Regular expression" come next, as
they set a similar property of the fields. Same goes for the "Case
sensitive" and "All charsets" group.
"Skip hidden" and the rest close the show up.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If "Search for content" checkbox is enabled, then content_pattern is
initialized as usual. Otherwise, it's forcibly set to NULL.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This checkbox allows to define whether the "Content" field should be
taken into account or not when performing file search. The checkbox
remembers its state across sessions.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* 2396_find_whole_words:
Some optimization of loops in translation functions.
Create strings with small preallocated sizes.
mc_search__cond_struct_new_regex_ci_str(): get rid of extra string duplication.
Minor optimization of translation function arguments.
Avoid extra-allocation of string while prepare to regexp-search.
Removed mc_search_cond_t->len (used mc_search_cond_t->str->len instead).
Fixed bit operations in mc_search_regex__process_append_str()
Code cleanup for avoid compiler warnings
Ticket #2396 (Find File "Whole words" search bug)
when searching in files for non english word with "Whole words" set "on" - then nothig will be found
try search word: "время" and also "time" in next example:
'time'
Время
'Time'
'время'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
In case sensitive sort, the order of files and directories is following:
hidden dirs
dirs
hidden files
files
In case insensitive mode, directories are mixed and files are mixed too:
dirs (hidden and not are mixed)
files (hidden and not are mixed).
This commit defines the sort order independently of case sensitivity:
hidden dirs
dirs
hidden files
files
Files in UTF-8 locale require special handling: leading dot must not be
processed in g_utf8_casefold() funcion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 2398_save_as_tilde_expand:
lib/lock.c: applied MC indentation policy.
Expand tilde while locking and unlocking files.
(edit_set_filename): expand tilde while setting file name.
Ticket #2398: tilde is not treated as home directory in editor "Save As" dialog.
* 2268_FISH_hide_panels_before_connect:
replace print_vfs_message to printf
Declarations of use_dash() and rotate_dash() were moved form lib/util.h to src/layout.h.
Apply code identation policy.
fish.c: some fixups.
Split function fish_open_archive_int() to fish_open_archive_pipeopen() and fish_open_archive_talk().
Ticket #2268 (FISH: hide panels before connecting)