../../mc/edit/editcmd.c:2519:50: error: field precision should have type 'int', but argument has type 'gsize' (aka 'unsigned long') [-Wformat]
match_expr = g_strdup_printf ("(^|\\s+|\\b)%.*s[^\\s\\.=\\+\\[\\]\\(\\)\\,\\;\\:\\\"\\'\\-\\?\\/\\|\\\\\\{\\}\\*\\&\\^\\%%\\$#@\\!]+", word_len, bufpos);
^ ~~~~~~~~
../../mc/edit/editcmd.c:2700:38: error: field precision should have type 'int', but argument has type 'gsize' (aka 'unsigned long') [-Wformat]
match_expr = g_strdup_printf ("%.*s", word_len, bufpos);
^ ~~~~~~~~
2 diagnostics generated.
make[2]: *** [editcmd.o] Error 1
make[2]: Target `all' not remade because of errors.
../../../mc/src/mcconfig/common.c:71:74: error: format string is not a string literal (potentially insecure) [-Wformat-security]
g_propagate_error (error, g_error_new (mc_main_error_quark() ,0, strerror(errno)));
^~~~~~~~~~~~~~~
../../../mc/src/mcconfig/common.c:83:74: error: format string is not a string literal (potentially insecure) [-Wformat-security]
g_propagate_error (error, g_error_new (mc_main_error_quark() ,0, strerror(errno)));
^~~~~~~~~~~~~~~
2 diagnostics generated.
make[3]: *** [libmcconfig_la-common.lo] Error 1
make[3]: Target `all' not remade because of errors.
../../mc/src/main.c:2165:41: error: format string is not a string literal (potentially insecure) [-Wformat-security]
message (D_ERROR, _("Warning"), error->message);
^~~~~~~~~~~~~~
1 diagnostic generated.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Now these functions will return newly allocated string in any case.
As third-side effect, fixed memory leak with '--disable-charset' configure option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
fixed: 'eval_marks' for correct vertical block delete.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed edit_block_delete, edit_delete_column_of_text for correct delete vertical block
fixed cursor position after delete block
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Problem:
BOOK_MARK_COLOR and BOOK_MARK_FOUND_COLOR are hardcoded
in edit/edit-widget.h and so cannot be changed via skin.
Solution:
Now these colors will configure via skin-file. Like:
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Editor completion became really confusing in 4.7.0-pre1:
1. The list is populated with words from the entire file. This is arguably
better than the old style, which scanned only up to the cursor. But the number
of suggestions are limited, and if you have a bigger file, some words won't
make it in the list. Besides, I somehow liked the old way.
2. Suggestions do not end on a word boundary. This may or may be not useful; but
it just increases the list of suggestions, which slows the user. In the end, it
beats the purpose of completions.
3. It completes the word I am currently editing. That's smart. :)
4. The suggestions are displayed in the order in which they were found from the
beginning of the file. This is my main gripe, because when using the editor for
coding, it is better to have suggestions based on the distance to the cursor.
Closer means higher. When writing a function, I am mainly interested in the
variable names I recently used.
5. Sometimes, it does not work at all, but I haven't investigated the bug. :(
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* add new button 'Find all' into Search dialog. Bookmarks all founded entries.
* fix: search dialog (buttons are positioned dynamically)
* some optimisation of usability.
Signed-off-by: Ilia Maslakov <il.smind@google.com>
fix: backward search. When the cursor set on the begin of the word,
search found this word, but should not.
Signed-off-by: Ilia Maslakov <il.smind@google.com>
thanx Daniel Borca <dborca@yahoo.com> for the patch
* fix special_chars in regex.c
* add whole_words into mc_search_struct
* add 'Whole words' into 'Search', 'Replace' 'File find' dialogs
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
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>
first commit for support drag cursor after end of line
* change mouse movement, allow place cursor after EOL
* change vertical select
* fix: right scroll
Signed-off-by: Ilia Maslakov <il.smind@google.com>
tty_touch_screen() is used instead of touchwin() function or macro.
tty_set_normal_attrs() is used instead of standend() function or macro.
tty_set_alt_charset() is used instead of acs() and noacs()
functions or macros.
tty_baudrate() is used instead of baudrate() function or macro.
tty_keypad() is used instead of keypad() function or macro.
tty_nodelay() is used instead of nodelay() function or macro.
tty_reset_prog_mode() is used instead of reset_prog_mode() function or macro.
tty_reset_shell_mode() is used instead of reset_shell_mode()
function or macro.
tty_beep() is used instead of beep() function or macro.
* 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>