steps to reproduce:
mcview_remember_file_position=1
test file: file1.ext
123
456
123
qwe
123
123
qwe
123
qwe
456
1) open file1.ext in mcedit search text 'qwe'
2) close file1.ext
3) open file1.ext in mcview
4) close file1.ext
5) reopen file1.ext in mcedit and search again text 'qwe'
search position is reset but should not be reset.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
In mcedit, when the selected text is copied to the clipboard, the selection disappears.
This behavior contradicts to the traditional behavior of all modern text editors and is highly annoying.
Now selection don't reset after the text is copied into the clipboard.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
All file panels related stuff was moved to midnight.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
RPMLint shows the following warnings:
mc.i586: W: conffile-without-noreplace-flag /etc/mc/Syntax
mc.i586: W: conffile-without-noreplace-flag /etc/mc/mc.lib
mc.i586: W: conffile-without-noreplace-flag /etc/mc/mc.charsets
First step: install Syntax into /usr/share/mc instead of /etc/mc.
This also fixes the impossibility of editing of system-wide Syntax file
in mcedit under root (menu Options->Syntax file->System Wide).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Midnight Commander's color/skin engine often reuses the same color definition for multiple elements on the UI.
This unnecessarily limits the possibilities when playing with colors.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(this_try_alloc_color_pair): if foreground and background editor colors
are undefined in syntax, the NORMAL_COLOR is used. This is wrong.
EDITOR_NORMAL_COLOR mut be used instead.
(edit_status): cleanup: remove useless color change.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* commit 'origin/2287_persistent_bookmarks':
Fix in lib/logging.c for proper work on 64-bit platforms.
Change of bookmark drawing.
Fixed memory leak: destroy serialization bookmarks if file position is not saved.
Use GArray for bookmarks instead of raw array.
Minor optimization, type accuracy, includes fix.
Ticket #2287 (mcedit: persistent bookmarks)
Save bookmarks of internal edit in filepos
Signed-off-by: Filip Sefrna <fsefrna@gmail.com>
Type accuracy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Added capability to modify options of QuickWidget.
Added capability to use custom callback in QuickDialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Now the focused button in editor quit dialog is "Cancel quit" as was
before 4.7.3 release. Button order stay as in 4.7.3 release.
Likewise for hex editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fixed incorrect calculate position start/end marked block,
after edit text in the area ahead marked text.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Renamed and moved src/editor/editloc.[ch] -> lib/lock.[ch].
Renamed lock handling functions.
Fixed library order in src/Makefile.am.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Check and correct value of option_tab_spacing during options loading.
Check and correct value of option_word_wrap_line_length during options loading
and after editor options changing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added params clipbord_store, clipbord_paste into [Misc] section.
created src/clipbord.[ch]
added copy_file_to_ext_clip, paste_to_file_from_ext_clip for copy/paste
text to the global X clipboard.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
added selection with mouse
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Code cleanup: make visibility of some functions as static
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed skins
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
new behavior: DEL - clear current field of dialog if text in the field is not modify and cursor not moved.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Code cleanups: avoid compiler warnings
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Hotkeys are already highlighted by the color; there is no any point
in using yet another attribute (uppercase) for emphasizing them
even more. Capitalizing a letter in the middle of a word looks ugly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The result of
touch 1.gz
is not a valid gzip'ed file. MCEditor crashes trying open it.
Changed initialization order of editor to init charset conversion
handler by non-zero value before open a file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Collect keybind-related variables in src/keybind.[ch] files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Split assignments and conditions. Type accuracy. Minor optimization.
Thanks Vit Rosin for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Remove selected text before input or paste from clipboard.
Thanks to nikk9 <dev.nul@mail.ru> for the original patch.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
fixed input multibyte chars in overwrite editor mode (remove character only when the first byte is inserted).
thanx to Egmont Koblinger <egmont@gmail.com> for original patch and ticket.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Applied MC indentation policy to all files modified in this branch
with some simple manual modifications.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
fixed trouble with vertical selection
more detail description:
In block selection mode (shift-F3) it's impossible to go beyond empty line with
up or left arrow (i.e. in top direction).
In general: it's impossible to pass any line shorter than finishing column,
until left arrow is pressed at column 0 (which won't work on empty line), e.g.
xxxCxxx
yyyyy
zzzzzDz
- put cursor in C position,
- press shift-F3,
- go to D position,
- press up arrow twice,
- press left arrow - you're unlocked now and free to go up.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>