This commit exposes the separate infopane bindings to configuration
from the user. This also adds support for separate bindings in the
terminal emulator view. Default bindings are provided, but can also
be rebound in bindings.json.
This commit separates actions in the command bar from actions in
a normal buffer, and implements what is needed to allow rebinding,
although an interface for command bar keybindings is not yet exposed
to the user.
This commit adds support for binding key sequences such as
"<Ctrl-x><Ctrl-c>". This commit does not solve the problem
of global bindings yet, and therefore the command bar doesn't
work properly in this commit.
Fix the 2nd part of #1773: resize via mouse drag doesn't work if the
split on the left contains other splits, i.e. is not a leaf node.
The problem is that only leaf nodes have unique id. For non-leaf nodes
ID() returns 0. So we shouldn't search the node by id.
So replace GetMouseSplitID() with GetMouseSplitNode().
Fix the 1st part of #1773: the dividing line between vertical splits
is not displayed if the split on the left contains other splits, i.e.
is not a leaf node.
* Makefile: Ensure we strip out embedded paths
To reproduce binaries undeterministic values needs to be removed. By
default Go embeds several module paths into the binaries, which prevents
people from reproducing said distributed binary.
The distributed binary from micro contains the full home path of the
current builder of the binary. -trimpath removes these paths from the
binary.
$ strings micro | grep "/home/zyedidia" | wc -l
868
This also helps other distributions providing reproducible versions of
micro down the line.
Signed-off-by: Morten Linderud <morten@linderud.pw>
* build-date: Ensure build time adheres to SOURCE_DATE_EPOCH
Embedding undeterministic values into binaries prevents reproduction of
the binaries. The reproducible builds projects defines
`SOURCE_DATE_EPOCH` to allow deterministic insertion of build times.
This patch ensures `build-date` checks the environment variable before
building with the local time.
$ SOURCE_DATE_EPOCH=123123 go run tools/build-date.go
January 02, 1970
$ go run tools/build-date.go
July 31, 2020
$ make build-quick && ./micro --version
[...]
Compiled on July 31, 2020
$ SOURCE_DATE_EPOCH=123123 make build-quick && ./micro --version
[...]
Compiled on January 02, 1970
https://reproducible-builds.org/specs/source-date-epoch/
Signed-off-by: Morten Linderud <morten@linderud.pw>