input_complete.c:383:42: error: variable 'p' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
temp = g_string_new_len (*env_p, p - *env_p);
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Move calls of disable_mouse() and disable_bracketed_paste()
to main() because init_mouse() and enable_bracketed_paste()
are called here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The code that manipulates the ncurses backend into changing
the key combination to generate SIGINT from CTRL-c to CTRL-g does
so by accessing undocumented internal ncurses data structures.
This breaks compilation with netbsd-curses[0], and could also break
when the ncurses author decides to change internal structures in a
future release.
Fix it by using a portable approach that works everywhere using libc
primitives instead.
[0] https://github.com/sabotage-linux/netbsd-curses
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3661_panel_mouse_click:
(edit_dialog_command_execute): when switch to another window, do not select it twice.
Set WOP_TOP_SELECT options for panel widgets: WPanel, WView and WTree.
Ticket #3661: wrong handling of mouse clicks in long listing mode.
This occurs if the left panel is in long listing mode and the right
panel is in full listing mode:
When the left panel is active and you click on the right side of the
panel, the click event is directed to the (inactive) right panel instead
of the (active) left panel.
This occurs if the right panel is in long listing mode:
When the left panel is active and you click on the left panel, the click
event is always directed to the (inactive) right panel. It's impossible
to click anything on the left panel, if the right panel is in long
listing mode.
Thanks Seray Rosh <seray.rosh@web.de> for intial patch.
Initial commit: refactoring of widget selection.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This bug was introduced in a8101d8403.
(layout_box): set up the output_lines value after close "Layout" dialog
box.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3632_widget_flags:
Reorganize WDialog flags.
(dlg_set_position): minor refactoring.
Rename DLG_WANT_TAB to WOP_WANT_TAB and move it to widget_options_t.
By default, WOP_WANT_HOTKEY option is off.
If widget wants cursor, define that explicitly.
Add WST_MODAL state.
WOP_TOP_SELECT: new widget option
Join widget_state_t and dlg_state_t.
Move WOP_WANT_IDLE option to widget_state_t flags
Move WOP_DISABLED option to widget_state_t flags
widget_state_t: new type.
(widget_get_options): new widget API.
Change prefix of widget options: W_ -> WOP_.
Ticket #3632: refactoring of widget flags.
* DLG_FULLSCREEN: move and rename to WPOS_FULLSCREEN.
* DLG_CENTER: move and rename to WPOS_CENTER.
* DLG_TRYUP: move and rename to WPOS_TRYUP.
* WDialog::fullscreen: remove, use WPOS_FULLSCREEN instead.
* WDialog::compact: new field. Use instead of DLG_COMPACT.
* WDialog:🎏 remove.
* dlg_flags_t: remove.
* dlg_create: add new agruments: pos_flags, compact. Remove
argument: flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The bug:
1. Go to the source directory for version 4.8.17.
2. Enter the command "ls -l misc/mc*". The output will show at least 7 files.
3. Start mc.
4. Press Meta-! to open the "Filtered View" dialogue box.
5. Enter the same command: "ls -l misc/mc*".
Result:
MC displays the following error:
"ls: cannot access misc/mc*: No such file or directory".
Fix:
(mc_popen): use popen(3) way: pass command to /bin/sh using the -c flag.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3637_search_memleaks:
Do not recreate "String not found" error string every time.
mcview: make backward search interruptible.
(mcview_search_update_steps): fix calculation of update step.
mcedit: make backward search interruptible.
(editcmd_find): minor refactoring.
Check error string before show message.
Allow search be interruptible.
(mc_search__run_regex): minor optimization.
Ticket #3637: fix memory leaks in search engine.