Jöran Karl
0de16334d3
micro: Don't forward nil events into the sub event handler ( #2992 )
2024-03-12 18:35:33 +01:00
Zachary Yedidia
9da6af91c8
Handle SIGABRT properly
2023-10-20 08:51:17 +02:00
Zachary Yedidia
5739daffc8
Exit application if input terminal has closed
...
Bump tcell to get access to event error information, and to propagate
input EOF errors as event errors.
Fixes #2569
Fixes #2148
2023-03-20 16:17:43 -04:00
Dmitry Maluka
e31f5ed26e
Add -profile flag for CPU profiling ( #2715 )
...
There is already a commented-out code in main() for enabling CPU
profiling of micro, which is often useful. Adjust it to allow enabling
it just by providing -profile flag on the command line, without
modifying and recompiling the code.
2023-01-29 18:10:57 -08:00
Zachary Yedidia
810133d5a8
Use shell job for terminal callback
...
Fixes #2529
2022-08-19 15:46:01 -07:00
Zachary Yedidia
3d6b0c6dd6
Ensure screen cannot draw during a term prompt
...
Fixes #2528
2022-08-16 22:07:41 -07:00
Zachary Yedidia
c315a91fc6
Allow aborting while opening a file with backup
...
Also fixes an issue where the abort prompt consumes interrupt signals.
Fixes #2151
2021-08-02 21:05:22 -04:00
Zachary Yedidia
0b0c99f1f5
Warn for readonly instead of setting option
...
Fixes #2106
2021-05-19 14:58:00 -04:00
Zachary Yedidia
0851499130
Handle SIGHUP properly
...
Fixes #2085
Not the nicest solution but it will do for now.
2021-04-20 21:27:59 -04:00
Zachary Yedidia
4c21808c6c
Remove clipboard error message
2020-12-16 21:35:07 -05:00
Zachary Yedidia
a424a0dca1
Fix autosave not running by default
2020-10-08 23:33:34 -04: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
11104fd093
Update to tcell v2
2020-09-05 14:52:35 -04:00
Zachary Yedidia
548bb98641
Properly close unmodified buffers on sigterm
2020-08-30 15:46:11 -04:00
Zachary Yedidia
b507cd26f4
Exit gracefully when SIGTERM is received
...
Ref #779
2020-08-01 20:18:07 -04:00
Zachary Yedidia
781a2dd826
Add flake8 linter, postinit and preinit
...
Closes #1768
2020-07-13 13:28:26 -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
b8fbbf5c83
Only lock event handling
2020-06-28 16:34:01 -04:00
Zachary Yedidia
253281ae5e
Add a lock for plugins to use if using async code
...
Ref #1539
2020-06-28 16:29:32 -04:00
Zachary Yedidia
a8332fd316
Improve backup system
...
This commit introduces several improvements to the backup system.
* Backups are made every 8 seconds for buffers that have been modified
since the last backup.
* The `permbackup` option allows users to specify that backups should
be kept permanently.
* `The backupdir` option allows users to store backups in a custom
directory.
Fixes #1641
Fixes #1536
Ref #1539 (removes possibility of race condition for backups)
2020-06-22 17:54:56 -04:00
Zachary Yedidia
d0b75bc09f
Add simulation screen tests
2020-06-20 18:24:12 -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
afeb07a024
More fixes for parsecursor
...
Fixes #1695
Fixes #1696
2020-05-30 12:23:29 -04:00
Zachary Yedidia
3fc9a8ad9e
Fix handling of +LINE:COL syntax
...
Fixes #1685
2020-05-29 22:48:23 -04:00
Dmitry Maluka
c5b0c2d41f
Fix dropped redraw events ( #1675 )
...
If screen.Redraw() is called very quickly after a key or mouse event,
it may send the redraw event while micro is not waiting for it but
still processing the key or mouse event. Since drawChan is non-buffered
and at the same time non-blocking, this redraw event will be simply lost,
so the screen content will not be up-to-date.
2020-05-23 14:59:23 -04:00
Zachary Yedidia
eff89a98a7
Fix v2 import path for go mod
2020-05-04 10:16:15 -04:00
Zachary Yedidia
671a188802
Support +LINE:COL flag syntax for cursor pos
...
Closes #1566
2020-03-24 10:10:44 -04:00
Zachary Yedidia
9e8d76f2fa
If stdout is a pipe, output to the pipe
...
If you run micro as `micro | cat` for example, micro will disallow
you from saving the file, and when you quit the buffer, the contents
will be sent to the pipe. This allows one to use micro as part of
an interactive unix pipeline.
Closes #1524
2020-02-27 12:39:19 -05:00
Zachary Yedidia
1a64ffb88b
Don't expose draw channel to outside packages
2020-02-11 20:39:26 -05:00
Zachary Yedidia
34724b941a
Recover from internal errors without crashing
2020-02-11 00:50:24 -05:00
Zachary Yedidia
8a907956d1
Use actual lua functions for callbacks instead of strings
2020-02-08 15:49:41 -05:00
Zachary Yedidia
6a1b8f4a4f
Add option to clean unused settings and other parts of config
2020-02-02 15:30:06 -05:00
Zachary Yedidia
b0624cb66e
Add support for plugin manager within micro
2020-02-02 14:20:39 -05:00
Zachary Yedidia
bcb1947a0a
Add plugin manager
2020-02-01 23:54:38 -05:00
Zachary Yedidia
e3131a0779
Add text event callback
2020-01-31 00:56:15 -05:00
Zachary Yedidia
03228762d4
Don't call plugin if nil
2020-01-28 22:06:58 -05:00
Zachary Yedidia
953f5a0eff
Highlight in parallel
2020-01-28 20:54:14 -05:00
Zachary Yedidia
b3e40a2644
Make debug mode flag, plugins can access logbuf
2020-01-15 22:25:08 -05:00
Zachary Yedidia
ddc8bf455e
Set filetype to 'off' to disable completely
...
Ref #1427
2020-01-02 19:00:42 -05:00
Zachary Yedidia
0bf54ff0e7
Don't crash if only file to open is directory
2020-01-02 15:25:07 -05:00
Zachary Yedidia
a2f7080602
Raw event support with new tcell
2019-12-31 22:34:43 -05:00
Zachary Yedidia
0301e3539e
Use upstream updated zyedidia tcell
2019-12-31 20:15:45 -05:00
Zachary Yedidia
6632ab0a77
Switch to gdamore/tcell
2019-12-31 17:53:16 -05:00
Zachary Yedidia
ff24ad5fa8
Fix race condition with events channel
2019-12-29 18:53:59 -05:00
Zachary Yedidia
fc706bc404
No backups for no name files
2019-12-25 17:05:11 -05:00
Zachary Yedidia
c4d5d7c195
Better backup behavior
2019-12-25 17:05:11 -05:00
Zachary Yedidia
b68461cf72
Terminal plugin callback support
2019-12-25 17:05:11 -05:00
Zachary Yedidia
7217911c3a
Add macro and QuitAll support
2019-12-25 17:05:11 -05:00
Zachary Yedidia
c0293b5d0e
Add autosave option
2019-12-25 17:05:11 -05:00