Testase:
* rm -f ~/.mc/Tree
* run mc
* F9 -> Command -> Directory tree
* Press F2
* Go to '/lib' item
* Press F2
* exit from mc
* run mc again
* F9 -> Command -> Directory tree
* press HOME key
Fix issue:
changed forgotten variable name.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
After implementation of keybinding engine and reimplenetation
of menu engine, MC starts very slow due to multiple trivial
(totally non optimized) search of many values in many arrays.
This patch performes the some speedup of MC startup process.
Statistics:
- startup time without the patch: 0m0.413s
- startup time with the patch: 0m0.073s
Great thanks to 0xe2.0x9a.0x9b for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fixed segfault in backward_word (widget.c)
...
The for loop, whose purpose is to remove exactly 1 character
(hence I don't get why it's a loop, but nevermind) was not UTF8-ready.
So if the character preceding the cursor was an accented one,
it jumped to the middle of the UTF-8 sequence, causing the rest of
the stuff go unpredictable.
Although it *should* never happen (which, as we all know,
does not equal to "never happens"), in this case "p" simply jumped
over "in->buffer". The function has a "p != in->buffer" check three times,
it might it more robust if you replaced that with "p >= in->buffer".
This should prevent the segfault, and just stay with a slightly buggy but
otherwise harmless alt-backspace behavior, should there be any UTF-8 or
similar bugs left. This change is not included in my patch.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
When pasting multiline text with shift+mouse newline characters
are lost. Pasted text is not shown before any key is pressed.
Middle-mouse pasting in mc requires shift being pressed to keep mc
from interpreting the button press itself, so it is passing on to
xterm/gpm. That has the nice side effect that the pasted enter
characters are automatically shift-enter, which was simply interpreted
as newline-without-autoindent. However, the keybinding for shift-enter
have been lost in the course of #212 - it simply does nothing,
and consequently text is pasted without newlines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Recently added syntax files were not added to Makefile.am,
therefore they won't get it to the distribution through
EXTRA_DIST and are not installed.
Now syntax/Makefile.am file contains all syntax file names
that are sorted alphabetically. Description of tt.syntax
was added to the syntax/Syntax file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Some FTP-servers don't have chmon support (or don't able to change permissions in some cases).
This commit will add "ignore_ftp_chattr_errors" section into config file.
Now default behavior: ignore FTP errors related to chmod operations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If ~/.mc/panels.ini have incorrect value of 'sort_order' key, then mc will crashed.
Fix issue: Now default sort_order for incorrect value is 'name' (sort by name)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This reverts commit 2f901ef642.
Patch is dirty. Added into repo misc/mc.ext - this is autogenerated
file and no need to store into repo.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 1774_build_cleanups:
Fixed several missing includes
Changed include 'glib.h' to 'global.h' because global.h file has some things for
vfs/mcserv.c: fixed variable name clashes and missing includes
vfs/undelfs.c: Fixed variable name clashes
vfs/vfs-impl.h: fixed missing includes
vfs/utilvfs.h: fixed missing includes
src/screen.c: const char* cleanup, fixing break on -Werror
Dropping non-strftime() support and fixing -Werror problem
m4.include/mc-use-termcap.m4: fixed const char* issue which triggers break on -Wall
Ticket #1774: Various build fixups (missing includes, name clashes, ...)
Problem:
a) when running ./configure, strftime() and other functions cannot be
properly detected, since autoconf generates crappy test code, which
at least fails when warnings are treated as errors (gcc: -Werror).
b) strtime() is standard since C89, so we can simply expect it to exists
(if there's *really* some acient box out there breaking mc build,
it's libc/toolchain should be fixed ;-p)
Solution:
Remove the checks for strftime() and all workarounds
* 1757_dotdot_dir:
Display ATime, MTime and CTime for ".." in file panel.
Fixed display info about ".." directory in Info panel.
Set correct stat info for ".." directory.
Ticket #1757: set actual stat info for ".." directory in panel.
1st step: minor refacoring.
Removed call of intermediate function and changed the retun value type.
Type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>