Modified behavior of CursorUp, CursorDown, CursorPageUp etc:
if softwrap is enabled, cursor moves by visual lines, not logical lines.
TODO: implement it also for Home and End keys: move cursor to the
visual start or end of a line. I haven't implemented it for now, because
I'm not sure what should be the behavior of StartOfTextToggle then
(considering that Home key is bound to StartOfTextToggle by default).
Fixes#1598
VLoc allows any location in the buffer to be represented as a visual
location in the linewrapped buffer. In particular, this is useful
for implementing moving cursor up and down within a wrapped line.
Fix displaying tabs and wide runes which don't fit in the window.
Don't overwrite the vertical divider and the adjacent window.
- For tabs: display only as many of the tab's spaces as fit in the window.
- For wide runes: if a rune doesn't fit, don't display it in this line at all.
If softwrap is on, display this rune in the next line.
Fixes#1979
Fixes issue with the usage of a slightly incorrect buffer height value
(v.Height should be v.Height-1 if statusline is displayed).
Also, to avoid too many duplications, the code reorganized a little:
buffer display params (width, height, gutter offset and others) are
calculated in a single place.
Softwrap implementation enhanced to fix various issues with scrolling,
centering, relocating etc.
The main idea is simple: work not with simple line numbers but
with (Line, Row) pairs, where Line is a line number in the buffer
and Row is a visual line (a row) number within this line.
The logic remains mostly the same, but simple arithmetic operations
on line numbers are replaced with corresponding operations on
(Line, Row) pairs.
Fixes#632, #1657
Fix regressions after ba98b55:
- Unable to override filetype autodetection by setting a specific filetype
for specific files, i.e. this doesn't work:
"*.h": {
"filetype": "c++"
},
- Unable to enable/disable syntax highlighting for specific files,
i.e. this doesn't work:
"*.c": {
"syntax": false
},
- "readonly" setting doesn't work (neither global nor per-filetype).
Fixed regression: since merging keybindings branch, TryBindKey and
UnbindKey and accordingly "bind" and "unbind" commands don't work
(fail to unmarshal bindings.json).
This is just a quick fixup to make TryBindKey and UnbindKey work again.
They still work with "buffer" bindings only.
In JumpToMatchingBrace, the loop should stop immediately after finding the matching bracket.
It causes multiple jumps in certain situations:
`(I [ ]{ }) => ( I[ ]{ })`
Fix the regression after 3b34a02: setting readonly option to true
in onBufferOpen lua callback doesn't work, since it is automatically
reset to false if write permission is not denied.
Added tabbar.active color group for displaying the name of the active
tab in the tabbar with different colors.
If tabbar.active is not defined in the colorscheme, the active tab name
is displayed with the same colors as inactive ones.
Ref #1646
Fix the following bugs:
- If a split pane is not at the left edge of the screen, the statusline
with suggestions for it is displayed at wrong place.
- When keymenu is enabled, the statusline with suggestions is not
displayed at all.
Add InfoBuf's method AddToHistory function which adds a new item
to the history for the prompt type `ptype`.
This function is not used by micro itself. It is useful for plugins
which add their own items to the history, bypassing the infobar
command line.
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.
When commenting a selection, the plugin won't just toggle each
line individually but will only uncomment the block if it is all
comments.
The comment plugin also now takes into account any number of spaces
between the comment character and the text. For example '//comment' will
be uncommented properly, as well as '// comment'.
Fixes#1758
Windows does not allow ':' in a path, but for some reason previous
versions still worked, except the file for storing buffer info
(which had a ':' in the name) was not viewable except by opening
it with micro.
Ref #1736