Ticket #3125: don't override precmd on Zsh

Do not override global precmd() funcation on Zsh. Define new _mc_precmd()
function and add it to precmd_functions array instead. This also effectively
fixes race condition with pwd call on Zsh, which may lead to empty prompt in mc.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '3125_zsh_precmd'

* 3125_zsh_precmd:
  Ticket #3125: don't override precmd on Zsh
Ticket #3093: fix sefault in case of run "mcedit relative/path/to/file".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '3093_keep_symlink_cwd_startup_fix'

* 3093_keep_symlink_cwd_startup_fix:
  Ticket #3093: fix sefault in case of run "mcedit relative/path/to/file".
src/subshell.c: indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Ticket #2290: make file find faster.

Gets rid of get_line_at() function that was called only at one place and
was tightly coupled with caller function. It allows to perform some
minor optimizations, and as a result improve search time by 8%.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Optimize updates of status bar during search.

Optimization is based on examining file size and time of the last status
update. This is synchronous and is based on assumption that relatively
small files are quickly processed even on slow hardware so if refresh
timeout expires during their processing, the delay couldn't be noticed
by human. Therefore only rather big files have to be reported
unconditionally, and others - only if there is a match in this file or
if timeout expires.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Refactoring of WListbox widget.

Use GQueue instead of GList to store listbox entries.

g_list_append() function is slow because it uses g_list_last()
internally to traverse from the beginning to the end of a list, so
forming a list of results has O(n*n) complexity instead of O(n).
GQueue contains pointers to head and tail of list and list length.
So in this case we don't need seach end of list every time when we
want append listbox entry to the listbox.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '2290_find_file_speedup'

* 2290_find_file_speedup:
  Refactoring of WListbox widget.
  Optimize updates of status bar during search.
  Ticket #2290: make file find faster.
Ticket #3117: Launching editor with CK_Edit shouldn't pass line number.

When pressing F4 to start the editor, a "+1" argument is passed to open
the file at the first line.

For some editor this is absolutely unnecessary since they open the file
there anyways. For some others (at least "joe", but probably others too)
this is harmful: joe has a convenience feature that by default it opens
the file where it was last open, unless of course overridden from
command line. Currently mc forces joe to open the file at the first
line, although opening it where it was last open would be much more
desired.

The right solution would be to consult mc.lib only when opening the
viewer/editor through the "word search in files (M-?)" feature, and
not when F3/F4 is pressed on a file, in the latter case $VIEWER or
$EDITOR should simply be launched with the filename but no additional
parameters.

Initial step: minor refactoring:
(do_edit_at_line): rename to edit_file_at_line.
(edit_file_at_line): changed type of arguments from int to gboolean.
(view_file_at_line): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Allow launch external editor/viewer w/o line number.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Launching external editor/viewer with F4/F3 w/o passing line number.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Update EN and RU manual pages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '3117_external_editor_line_number'

* 3117_external_editor_line_number:
  Update EN and RU manual pages.
  Launching external editor/viewer with F4/F3 w/o passing line number.
  Allow launch external editor/viewer w/o line number.
  Ticket #3117: Launching editor with CK_Edit shouldn't pass line number.
Ticket #3119: fix format paragrap formatting.

(word_start): remove extra decrement.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(format_paragraph): fix wrong refactoring.

Partially revert of 253d27b1a347ad0376b943d8c58ed126c7e8b72f.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add editor_stop_format_chars ini option.

This option contains a set of characters to stop paragraph formatting.
If one of those characters is found in the begin of line, that line and
all following lines of paragraph will be untouched. Default value is
"-+*\,.;:&>".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '3119_format_paragraph'

* 3119_format_paragraph:
  Add editor_stop_format_chars ini option.
  (format_paragraph): fix wrong refactoring.
  Ticket #3119: fix format paragrap formatting.
Ticket #2857: add handling .zip extension.

Add 'shell/i/.zoo' to detect zip archive using .zip extension
in addition to 'type/i/^zip\ archive'.

Thanks ctmp1 <gvlatyshev@gmail.com> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '2857_zip'

* 2857_zip:
  Ticket #2857: add handling .zip extension.