keyboard input: simplify code, no logic changes
This change slightly simplifies and rearranges the code
in get_key_code(), reduces indentation levels there,
adds a few comments. The logic remains the same.
This is a preparatory patch for subsequent changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 2968_viewer_next_prev_mode:
Fix mode switch after CK_FileNext/CK_FilePrev.
(regex_command_for): new function to use regex_command in already created viewer/editor
(exec_extension): rename variable.
(exec_extension_view): refactoring: remove temporary file in exec_extension().
Ticket #2968: mcviewer: broken Raw/Parse and Format/UnformatRaw/Parse and Format/Unformat
For upload English hint-file to transifex, type:
cd doc/hints/po && make to-transifex
For download translation from Transifex type:
cd doc/hints/po && make from-transifex && \
git add ../l10n/mc.hints.* && \
git commit -s -m 'Update hints files from Transifex'
WARNING! For the functionality you should have installed 'tx' and 'po4a'
utilities. These utilities isn't required for compile and install mc
(you may install these utilities only if you want to interact with Transifex).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 2957_mcedit_broken_autocompletion:
(editcmd_dialog_completion_show): adjust dialog position.
(edit_complete_word_cmd): don't get bytes directly from editor buffer.
Add test_autocomplete_single() test
Add tests for coverage the bug.
(edit_complete_word_cmd): make correct charset conversion
Ticket #2957: broken autocompletion in mcedit
...if system and file charsets are different.
Initial step: refactoring: do actual completion word substitution
outside of editcmd_dialog_completion_show().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The bug:
If we open a file with F3 from panels, then mc uses "file extension"
style open (e.g. archive.sh) and Format/Raw switching is O.K.
If we open file in "Raw" mode, or use quick view, mc opens files
without "file extension" helpers. Format/Raw switching is broken.
In mcview_load() we check magic_mode and detect "compressed" files.
If magic mode is on and file is "compressed" we free the current vpath
and generate a new vpath with "decompress magic", but nothing else.
So, the file name disappear and we see the raw content.
After user press F8, mcview reloads the file. Now filename is the "new"
magic filename. mcview_load() open the file with the decompress "helper"
(using sfs). We see the uncompressed (parsed) content.
After user press F8, nothing happend, because original file name is lost.
The solution:
Remove the old vpath destruction.
Open the file with "uncopress magic" if magic_mode is on and file is
"compressed".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Widely used java web application .war archives are are .jar archives
which is essentially a zip archive with manifest file being the first
entry.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 2944_cleanup: (35 commits)
Update all po/*.po files.
Rename keymap files to be with .keymap suffix.
(mc_config_new_or_override_file): minor optimization.
Refactoring: use GString instead of "struct selection".
(edit_translate_key): move from editkeys.c into editwidget.c
Sync with gnulib 62bb7a8bf95807d6339e1e17fc0d21c319b280a2.
Code refactoring in tests.
Adjust look'n'feel of editor options dialog window.
Clarify EN and RU man pages: list command line options alphabetically.
(overwrite_query_dialog): adjust dialog size.
Clarify widget redraw in runtime.
(size_trunc_len): support automatic maximum unit for specified size.
Fix formatting in manual pages.
Fix wrapper location in description of -P/printwd option.
(edit_insert_over): move from src/editor/editcmd.c into src/editor/edit.c.
(edit_insert_column_of_text_from_file): refactoring:
(edit_get_byte): refactoring: use edit_get_byte_ptr().
Code refactoring in tests.
Grammar fix in English man-page.
(init_panelize): support --disable-nls.
...
* src/filemanager/lib/mountlist.c: port to HP NonStop.
(hasmntopt) [!HAVE_HASMNTOPT]: New function.
(MNT_IGNORE) [MNTOPT_IGNORE]: Use it.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* move from src/editor/editcmd.c into src/editor/edit.c and make static;
* rename to edit_insert_column_from_file;
* make some refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>