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
Pass *tcell.EventMouse to action callbacks for "mouse actions", i.e. to
onMousePress, preMouseDrag and so on, similarly to how we pass it to lua
functions bound to mouse events.
Swaping `MainTab` calls to `h.tab` will not change the normal micro
behaviour.
This changes will make possible to call `ForceQuit`, `VSplitIndex` and
`HSplitIndex` for tabs that aren't main one.
This slightly changes the open and term command to be similar with the
Quit action, where the buffer or pane is replaced after the prompts are
completed if "n" wasn't pressed after the 1st prompt.
Copy build constraints in actions_other.go to terminal_unsupported.go,
to avoid maintaining separate build constraints that are similar with
terminal_supported.go.
Support terminal emulation on platforms below:
- Solaris
- NetBSD: Supported in creack/pty since v1.1.12
- OpenBSD with GOOS != amd64
- Other architectures are supported now in creack/pty
Setting options directly in (h.)Buf.Settings without calling SetOption() or
SetOptionNative() is generally not the best idea, since it may not
trigger the needed side effects.
In particular, after https://github.com/zyedidia/micro/pull/3343,
directly setting `diffgutter` and `ruler` causes them not being tracked as
locally overridden per buffer, so if we run the `reload` command,
it unexpectedly replaces them with the default ones.