Suppose you have two files, foo and bar. Both files have 444 permissions.
Now edit foo and "Save". It can't save and instead prompt you to "Save As".
Enter bar. It will chmod bar to 644. If we don't touch touch existing file
permissions for "Save", I don't see why we should for "Save As".
Patch adds S_IWUSR only if different_filename and file does not exist yet.
For consistency, it's S_IWUSR not S_IWRITE.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Type accuracy.
Used gboolean instead of int for some dual-value variables.
Used static buffer for search result instead of dynamically
allocaled and freed memory.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
view.c:3237: format not a string literal and no
format arguments
utilunix.c:171, utilunix.c:173:
assignment discards qualifiers from pointer target type
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
* The sample of the containing text by file search;
* The sample of search in file mcview;
* The sample of search in mcedit (search operation);
* The substituting text in mceditor (replacement operation).
Author: Alexey Korop
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Editor: search will continue from last search string if SHIFT+F7 hotkey pressed
at first time (without pressed F7 key).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
add const MC_HISTORY_SHARED_SEARCH into history.h
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Fixed bashism in 'mcu7zip_rm' and 'mcu7zip_rmdir' functions.
* Use 'printf' instread of 'echo -e'
* stderor redirected to /dev/null
Thanks to narcan.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
The new "First hit" checkbox stops search in the file
if the first entry was found in that file
(thanks to Dominus (sergey.zaveruha at gmail dot com)).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
src/find.c: code refactoring.
+ Unification of variable names.
+ Some static variables was moved out from functions to remember
find options between find sesions.
+ Do not keep i18n results if find dialog was destroyed.
+ Type accuracy.
+ Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Regression was introduced in lzma support
(a5ba27872979bc6a15418ec30d6d115e9ba92235)
All the heuristics stuff has been removed, only
LZMA utils 4.32.1 and later formats are supported.
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
Fix issue: in function src/utillinux.c:my_system() added code for splitting
command line by spaces, use just first token as argument to function execlp()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If MC built with --without-subshell option is run with -d option,
the Ctrl-C key combination closes MC. Such behaviour was introduced
in 66332a4fb1d3b9e7304a477eaa2dc8b5f9eb0e80 commit.
This commit actually restores the SIGINT signal handling which was
before 66332a4fb1d3b9e7304a477eaa2dc8b5f9eb0e80 commit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* listbox_select_first has been introduced
* listbox_select_last has been reworked
Now when you press KEY_UP staying on the first
entry, you will get to the entry and vice versa
with KEY_DOWN staying at the last entry.
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>