* 4426_cleanup: (38 commits)
Update po/*.po files.
(edit_find_editor): rename from find_editor.
Listbox window: rename functions.
(buttonbar_find): rename from find_buttonbar.
Menu: rename functions.
(advanced_chown_cmd): use intermediate variables to make text more readable.
Use mc_fgetflags() and mc_fsetflags() where needed.
VFS: mc_fgetflags, mc_fsetflags: new APIs.
Minor optimization of chown/chmod/chattr operations.
(operate_single_file): clarify creation of file operation UI.
(dlg_default_destroy): send MSG_DESTROY to the dialog itself
Collect all editor options to structure.
Add EDIT and CONST_EDIT macros.
usermenu: clarify compilation w/o internal editor.
src/editor/spell.c: add missed #include.
Update template for .c files.
(do_search): remove intermediate variable.
(do_search): get rid of string duplication.
Change WDialog::data from void* to union{void*, int}
Don't create an empty string in WLabel objects.
...
Create UI to show confirmation dialog in case of foreground operation
regardless of ENABLE_BACKGROUND.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (simple_status_msg_init_cb): pass NULL instead of "" to label_new()
to get rid of an empty string duplication.
* (advanced_chown_dlg_create): likewise.
* (chown_dlg_create): likewise.
* (dirsize_status_init_cb): likewise.
* (file_op_context_create_ui): likewise.
* (setup_gui): likewise.
* (init_hotlist): likewise.
* (init_learn): likewise.
* (file_progress_show_source): pass NULL instead of "" to
label_set_text() to get rid of an empty string duplication.
* (file_progress_show_target): likewise.
* (create_file_manager): pass NULL instead of 0 to label_new().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with GNU tar b8feb2b14247d76200fd53607d3613c82b6e5b81.
Access header->buffer + offsetof (struct posix_header, magic), instead
of header->header.magic, when reading or writing the OLDGNU_MAGIC
pattern. The code violates the C standard without this change, and GCC
warns about this if fortify checking is enabled. It's not a bug on
traditional (i.e., non-debugging) platforms, but it does violate the C
standard so it should be fixed. Problem originally reported by John
Emil Karlson in
<http://lists.gnu.org/archive/html/bug-tar/2010-04/msg00023.html>.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with GNU tar 33b63ebe94b8a2dc2cb8fb907d8b7c16591b05bc.
(struct extra_header): Removed unused structure.
(union block.extra_header): Removed unused member.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Include <fcntl.h> for the declaration of posix_fallocate. This
avoids an implicit function declaration and build issues with future
compilers.
Signed-off-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
When using zsh with starship.rs prompt generator, MC sometimes fails
to show the subshell prompt. This is not deterministic. Sometimes the
prompt is shown and sometimes it isn't.
The reason is that the shell prints the prompt in multiple chunks. The
first chunk contains the "real" prompt and the second is an escape
sequence for enabling bracketed paste mode. If both chunks are read by
MC in a single invocation of read_subshell_prompt(), the prompt is
shown correctly. If, however, read_subshell_prompt() reads each chunk
in separate invocations (because the second chunk is not ready during
the first invocation), the prompt is not shown. More precisely, only
the bracketed paste mode escape sequence is shown as a prompt in MC.
This can be demonstrated with the following commands:
export SHELL=$(which zsh)
export ZDOTDIR=/tmp/zshdotdir
export STARSHIP_CONFIG=/tmp/starship-test.toml
mkdir -p "$ZDOTDIR"
echo 'eval "$(starship init zsh)"' > "$ZDOTDIR/.zshrc"
echo 'format = "XXXX: $directory$character"' > "$STARSHIP_CONFIG"
mc
In my case, the prompt is usualy shown after mc start and it
disappears after changing a directory in mc. In that case, the prompt
is read() in the following two chunks:
- 63 bytes: \xd\x1b[0m\x1b[27m\x1b[24m\x1b[J\xd\xaXXXX: \x1b[1;36mmc/.git\x1b[0m \x1b[1;32m\xe2\x9d\xaf\x1b[0m \x1b[K
- 8 bytes: \x1b[?2004h
To fix the problem, we remove clearing of the prompt string in
read_subshell_prompt(). It is sufficient that the prompt is cleared
when receiving '\n' and in feed_subshell().
Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If start directory of find files matches to the relative ignore
directory, nothing is found.
(do_search): the start directory is the first one in the directory
stack. Do not apply ignore_dir to it.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The default margin is 72 characters, but the editor would keep 73 character
long lines without breaking them.
The visual length of strings was calculated incorrectly. The way "for" loop
was implemented, the byte length would be incremented before exiting the
loop. That would correspond to a character that doesn't fit the line.
Increment the byte length in a separate statement.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Previously, both file panels share panelization results.
Now each file panel has own panelization buffer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Set "errdhotfocus" to a higher contrast color combination. Yellow is barely
visible on lightgray. The cursor stands on the the focused hotkey. If the
cursor is an underscore, the high contrast is obviously needed. If the focus
is a full box, it normally inverts both the background and the foreground, so
poor contrast remains poor. Red on lightgray is consistent with other colors
of the skin.
Set "menutitle" to yellow on blue. Otherwise, the title is not
distinguishable from the menu entries. Both "parent" skins, default and
xoria256, use distinctive color for the popup menu title.
Set "editrightmargin" to the same color as the panels. White on blue is
extremely distracting in contrast to black background to the left of the
margin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>