Map-typed values in the parsedSettings map do not represent settings for
individual options, they represent maps of settings for multiple options for
the given glob or ft: pattern, and their keys are not option names, they are
glob and ft: patterns. So do not expose them to the callers of ParsedSettings(),
to prevent the callers from mistakenly treating those patterns as option names,
with unpredicted consequences.
Co-authored-by: Dmytro Maluka <dmitrymaluka@gmail.com>
Micro always saves the undo stack information into the serialized buffer
file as long as either `saveundo` or `savecursor` is enabled. Whereas in
the case when only `savecursor` is enabled, while `saveundo` is
disabled, this information is not used afterwards, so it only wastes the
disk space in `~/.config/micro/buffers`. (And given that currently micro
never automatically removes any serialized buffer files, it may
significantly contribute to the overall ever growing size of the
`~/.config/micro/buffers` directory.)
So avoid saving the undo info if `saveundo` is disabled. This makes the
size of each serialized buffer file with savecursor=on saveundo=off
small and predictable, e.g. around 600 bytes in my observations (whereas
without this fix, it may grow indefinitely big, depending on the number
of modifications the user made before saving the file).
Micro doesn't support chained actions for command mode keybindings yet,
it only supports them for regular buffer keybindings. Whereas Ctrl-c and
Ctrl-x are bound by default to the chained actions Copy|CopyLine and
Cut|CutLine in both buffer mode and command mode, so in command mode
Ctrl-c and Ctrl-x don't work at all (with default keybindings).
Luckily CopyLine and CutLine would not be not very useful in command
mode anyway. So fix the issue by changing the default keybindings in
command mode to the simple non-chained actions Copy and Cut.
"Split(args[0])" has been performed since "open" was added[1], but it
may had been left by accident. It's unlikely desired when using the
command prompt, and doesn't seem to have been added once to commands
such as "vsplit" [2] which were implemented days before.
[1]: 5825353f64
[2]: 541daf212e
* config: Don't hardcode the `fakecursor` under Windows console any longer
We just set the global default and allow the user to override it.
* help: Add a concrete note for the `fakecursor` option in the Windows Console