Zachary Yedidia
c3a17a71be
Rename to incsearch
2021-01-27 13:49:38 -05:00
Zachary Yedidia
120cd02b30
Merge branch 'PR-find-on-type' of https://github.com/ilius/micro into ilius-PR-find-on-type
2021-01-27 13:48:01 -05:00
Siddhant N Trivedi
cf35b8021c
Fix some quality issues ( #1914 )
...
* Add .deepsource.toml
* Fix unnecessary typecasting on `bytes.Buffer`
* Fix check for empty string
* Replace nested if block with else-if
* Replace nested if block with else-if
* Replaced string.Replace() with string.ReplaceAll where n<0
* Remove deepsource toml file
Signed-off-by: siddhant-deepsource <siddhant@deepsource.io >
Co-authored-by: DeepSource Bot <bot@deepsource.io >
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2021-01-09 13:39:21 -05:00
Dmitry Maluka
e80f899480
Fix non-working TryBindKey and UnbindKey ( #1970 )
...
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.
2021-01-05 19:37:49 -05:00
Saeed Rasooli
dd37ad5ce4
add settings option "findontype" to allow disabling search-on-type
2021-01-04 10:30:47 +03:30
worldmaker
06a5f1a62d
fix the missing break in JumpToMatchingBrace ( #1960 )
...
In JumpToMatchingBrace, the loop should stop immediately after finding the matching bracket.
It causes multiple jumps in certain situations:
`(I [ ]{ }) => ( I[ ]{ })`
2020-12-27 18:38:16 -05:00
Zachary Yedidia
95fea064b0
Fix internal string binding representation
2020-11-05 15:52:25 -05:00
Sourya Vatsyayan
fc3dd9a62f
Fix quality issues ( #1856 )
...
* Add .deepsource.toml
* Remove unnecessary comparison with bool
* Remove unnecessary use of slice
* Replace multiple `append`s with one
* Remove unnecessary wrapping of function call
* Fix check for empty string
* Simplify error creation with `fmt.Errorf`
* Fix defers before error check
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Remove untrappable `os.Kill` signal
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Remove empty else branch
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Add missing error check
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Merge variable declaration and assignment
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Remove unnecessary `nil` check
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Revert changes to generated files
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
* Remove .deepsource.toml
Signed-off-by: sourya_deepsource <sourya@deepsource.io >
Co-authored-by: DeepSource Bot <bot@deepsource.io >
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-09-16 00:08:01 -04:00
Zachary Yedidia
5044ccf6bb
Update keybinding docs
...
Also updates the pane type of `info` to `command` which is a more
descriptive name.
2020-09-06 17:38:23 -04:00
Zachary Yedidia
96601a915d
Replace meta with alt automatically, update tcell
2020-09-05 21:59:19 -04:00
Zachary Yedidia
11104fd093
Update to tcell v2
2020-09-05 14:52:35 -04:00
Zachary Yedidia
c5bafbc1c5
Merge
2020-08-12 01:18:18 -04:00
Zachary Yedidia
6b80870dfd
Don't auto-relocate mouse events
2020-08-12 01:18:15 -04:00
Zachary Yedidia
5cb618c466
Improve showkey command
2020-08-11 22:18:10 -04:00
Zachary Yedidia
352f57cf11
Enable registering raw events
...
Fixes #1821
2020-08-11 14:36:58 -04:00
Zachary Yedidia
1e83e666fb
Don't overwrite user bindings
...
This fix still needs more work.
Ref #1821
2020-08-11 01:43:41 -04:00
Zachary Yedidia
0283c01432
Record events in cursor
2020-08-09 16:42:03 -04:00
Zachary Yedidia
bbd6f559ab
Allow configuration for info/term bindings
...
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.
2020-08-09 16:42:03 -04:00
Zachary Yedidia
2363a4019b
Separate bindings for buffers and command bar
...
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.
2020-08-09 16:42:03 -04:00
Zachary Yedidia
d33c28eeb8
Preliminary support for key sequences
...
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.
2020-08-09 16:42:03 -04:00
Zachary Yedidia
5ff8b3791d
Basic implementation of KeyTree
2020-08-09 16:42:03 -04:00
Zachary Yedidia
6c53407e6d
Improve internal keyevent names
2020-08-09 16:42:03 -04:00
Zachary Yedidia
dd54a64746
Initialize t.release to true
2020-08-04 18:41:14 -04:00
Dmitry Maluka
6e43af31cb
Fix non-working split resize with mouse drag ( #1811 )
...
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().
2020-08-04 18:37:19 -04:00
Zachary Yedidia
95ec55fbbf
Check error in terminal emulator
2020-07-27 17:43:55 -04:00
Zachary Yedidia
102ae04a16
Improve multicursor clipboard
...
Ref #1721
2020-07-05 01:12:35 -04:00
Zachary Yedidia
037c3c993f
Add clipboard support for multicursors
...
Fixes #1721
2020-07-04 21:26:36 -04:00
Zachary Yedidia
d8596919a6
Fix reading clipboard internally for OSC52
2020-07-04 20:54:27 -04:00
Zachary Yedidia
f143418267
Add support for copy-paste via OSC 52
...
Ref #1754
2020-07-04 20:00:39 -04:00
Zachary Yedidia
67355337b3
Fix escape not exiting prompt
2020-07-03 22:12:58 -04:00
Zachary Yedidia
32c8517a90
Rebind escape to clear info and deselect
2020-07-03 21:02:16 -04:00
Zachary Yedidia
3ddb2ee316
Add Search function to BufPane
2020-06-23 18:47:42 -04:00
Zachary Yedidia
d0b75bc09f
Add simulation screen tests
2020-06-20 18:24:12 -04:00
Zachary Yedidia
bcc35c9f8c
Fix backspace on Windows
...
Fixes #1735
2020-06-20 13:22:01 -04:00
Zachary Yedidia
f5dc0a51ba
Fix issue with search and replace at the end of a range
2020-06-18 16:38:10 -04:00
Zachary Yedidia
a584ff36de
Merge
2020-06-17 23:14:03 -04:00
Zachary Yedidia
f5405cee18
Improve keybinding label consistency
...
The old notation (for example `CtrlG`) causes confusion when combined
with new notation needed for alt (`Alt-g`) due to Alt being case
sensitive. Previously both formats were supported, but the documentation
and defaults used a combination. This commit only uses the new notation
for consistency.
Ref #1470
2020-06-17 23:11:50 -04:00
Zachary Yedidia
3516c8a9a6
Start replacement search at cursor location
...
Fixes #1731
2020-06-17 22:43:22 -04:00
Zachary Yedidia
efb38b8636
Merge branch 'settings-config'
...
With these changes, settings.json should only contain options that
have been modified from their default values. Micro will actively
options that are set to default values from the settings.json file.
To see a full list of settings and their defaults, see the "options"
documentation, as well as `micro -options`.
2020-06-09 16:34:37 -04:00
Zachary Yedidia
0654db334a
Show key name in raw pane
2020-06-09 15:57:52 -04:00
Zachary Yedidia
660d345880
Don't apply cli options to settings.json
2020-06-08 22:19:15 -04:00
Zachary Yedidia
79ee757757
Only start autocompletion for alphanumerics
...
Ref #1712
2020-06-08 13:54:31 -04:00
Zachary Yedidia
140662f1ec
Verify that all settings have correct type
...
This prevents crashes that occur when the user has put the wrong
type for a setting manually in the settings.json file.
2020-06-07 17:31:16 -04:00
Zachary Yedidia
44c1929f9d
Fix mouse support in command bar
2020-06-07 15:46:12 -04:00
Zachary Yedidia
ffc922a7c5
Only perform save callback if save was successful
...
Fixes #1684
2020-05-29 15:02:38 -04:00
Zachary Yedidia
8bd7e5807c
Always use current pane for keybinding actions
...
Fixes #1677
2020-05-29 14:38:29 -04:00
Andrew Clarke
9b59e07b47
Use "goto -1" to move cursor to end of document. ( #1691 )
2020-05-29 13:29:09 -04:00
Zachary Yedidia
79c0ea17ad
Use CharacterCount over RuneCount
2020-05-20 16:47:08 -04:00
Zachary Yedidia
0a6720498f
Merge branch 'master' of https://github.com/zyedidia/micro
2020-05-17 12:23:21 -04:00
Zachary Yedidia
c46257222c
Add support for FindLiteral
...
Use the FindLiteral action to use Find without regex support.
Fixes #1661
2020-05-17 12:22:33 -04:00