cutelisp
0b9c7c0c4a
Add toggle & togglelocal command ( #3783 )
2025-09-05 20:56:02 +02:00
deepdring
b8057f28c6
refactor: use a more modern writing style to simplify code ( #3834 )
...
Signed-off-by: deepdring <deepdrink@icloud.com >
2025-08-26 02:00:51 +02:00
cutelisp
3a7705a090
Enhance GetNativeValue
2025-07-11 11:21:40 +02:00
blamedrop
55a553041b
Update log buffer name as well
...
Using such fake path have some issues as mentioned in https://github.com/zyedidia/micro/pull/3791#discussion_r2176197355 comment
2025-07-09 00:47:15 +02:00
blamedrop
532a229c57
Add buffer name for raw pane
2025-07-09 00:47:15 +02:00
Dmytro Maluka
baa632e6cc
Remove PluginCBRune()
...
Now that we can pass extra args directly to PluginCB(), we can remove
PluginCBRune() for simplicity.
2025-06-21 03:09:55 +02:00
Dmytro Maluka
7861b00cd1
Pass mouse info to {on,pre}MouseXXX callbacks
...
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.
2025-06-21 03:06:48 +02:00
Dmytro Maluka
54ba3cdb4f
Make PluginCB() a variadic function
...
So that we can pass extra arguments to bufpane callbacks easily, by
passing them directly to PluginCB().
2025-06-21 03:04:37 +02:00
cutelisp
5eddf5b85d
Change MainTab calls ( #3750 )
...
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.
2025-05-26 22:07:14 +02:00
Jöran Karl
58b6917526
command: Apply small cosmetics to openTerm()
2025-05-08 06:27:11 +02:00
Jöran Karl
63b6a1e6cf
command: Extract term() as dedicated openTerm() function
2025-05-08 06:27:07 +02:00
Jöran Karl
4769a94fb1
command: Exit loop in TermCmd() after terminal call
...
Otherwise the last opened pane is closed instead of the active one.
2025-05-07 19:33:31 +02:00
cutelisp
ca32ffbb4a
Change variable visibility ( #3720 )
...
Changed DoubleClick and TripleClick to public so they can be accessed by
Lua plugins.
2025-04-29 20:55:01 +02:00
niten94
c457ae421a
Generalize save prompt on close code into method
...
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.
2025-04-18 19:21:27 +08:00
niten94
0d5b2b73e3
Skip save on open or term command if buffer is shared
2025-04-18 19:19:19 +08:00
Mikko
79fe4ae3e3
fix cycling through completion suggestions ending in non-word character ( #3650 )
2025-04-15 21:02:41 +02:00
cutelisp
b88300ef7f
Fix comment ( #3716 )
2025-04-12 12:27:00 +02:00
niten94
f2454c9248
Specify tags where term emulation is unsupported
...
Copy build constraints in actions_other.go to terminal_unsupported.go,
to avoid maintaining separate build constraints that are similar with
terminal_supported.go.
2025-04-05 17:49:57 +08:00
niten94
a699cac3be
Support term emulation on solaris, netbsd, openbsd/*
...
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
2025-04-05 17:49:57 +08:00
Dmytro Maluka
948b05745f
Fix remaining gofmt complaints
2025-03-24 23:04:06 +01:00
Dmytro Maluka
eadc402ae0
Import paths: fix non-alphabetic order
...
Make gofmt happy about that.
2025-03-24 23:01:48 +01:00
Dmytro Maluka
1bd86a8f79
Build constraints: switch to new syntax
...
Make gofmt happy about that.
2025-03-24 22:54:32 +01:00
Neko Box Coder
9003243178
Removing the use of SetName() for file buffers
2025-03-12 19:24:36 +00:00
Neko Box Coder
c9f12206e9
Updating SaveCmd to use saveBufToFile instead
2025-03-11 03:11:03 +00:00
Jöran Karl
49aebe8aca
save+util: Provide a meaningful error message for safe (over-)write fails
2025-02-28 18:57:53 +01:00
Jöran Karl
63d68ec441
bindings: Perform write process safe
2025-02-28 18:57:53 +01:00
Jöran Karl
1663a1a6e4
actions: Don't overwrite the buffers Path
...
This is fully handled within the buffers `save` domain.
2025-02-28 18:57:53 +01:00
Jöran Karl
6e8daa117a
ioutil: Remove deprecated functions where possible
2025-02-28 18:57:53 +01:00
Jöran Karl
18a81f043c
util: Generalize the file mode of 0666 with util.FileMode
2025-02-28 18:57:53 +01:00
Jöran Karl
5aac42dbe7
bindings: Convert os.IsNotExist() into errors.Is()
2025-02-28 18:57:53 +01:00
Jöran Karl
3fcaf16074
actions: SaveCmd: Print the error of SaveAs to the InfoBar
2025-02-28 18:57:53 +01:00
Jöran Karl
5c21241fc4
actions: SaveAs: Print the error of os.Stat() to the InfoBar
2025-02-28 18:57:53 +01:00
Jöran Karl
ddc6051b33
actions: Use SetOptionNative() instead of setting options directly
...
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.
2025-02-20 20:24:07 +01:00
Jöran Karl
e4b0ad7107
Merge pull request #3620 from JoeKar/feature/cursor-overwrite-indicator
...
statusline: Provide `overwrite` mode indicator
2025-01-31 17:59:36 +01:00
Neko Box Coder
dc18642985
Add missing resize in TabMove ( #3619 )
2025-01-28 21:04:05 +01:00
yz778
c02036e52f
Prompt to save or discard new files even with autosave enabled ( #3626 )
2025-01-25 20:24:31 +01:00
Jöran Karl
c61670e86f
buffer: Store the overwrite mode
2025-01-22 17:12:50 +01:00
matthias314
f5debdf8fe
ignore quoted and escaped characters when splitting keybindings into actions ( #3612 )
2025-01-20 20:28:38 +01:00
Jöran Karl
f49487dc3a
import: Use micro-editor/terminal instead of zyedidia/terminal ( #3600 )
2025-01-14 18:20:37 +01:00
Jöran Karl
2ddf461ad8
import: Use micro-editor/json5 instead of zyedidia/json5
2025-01-04 16:01:20 +01:00
Jöran Karl
6600430e88
import: Use micro-editor/tcell (legacy) instead of zyedidia/tcell ( #3593 )
2025-01-04 15:55:46 +01:00
matthias314
2898f1590d
made FindNext and FindPrevious work with empty matches ( #3572 )
2024-12-17 18:52:44 +01:00
matthias314
aa0fefcaa1
skip empty match right after previous match in ReplaceCmd ( #3566 )
2024-12-17 18:44:48 +01:00
matthias314
8cdf68bbf6
skip save dialog on quit if buffer is shared ( #3559 )
2024-12-09 19:42:19 +01:00
Jöran Karl
fb20818042
Merge pull request #3540 from JoeKar/fix/cursor-down
...
actions: Perform `Cursor(Page)Down` with selection like GUI editors do
2024-12-04 21:23:40 +01:00
Dmytro Maluka
71a26381c0
Fix unwanted view adjustment after page down ( #3555 )
...
Fix regression introduced while implementing nano-like page up/down in
commit b2dbcb3e : if the view is already at the end of the buffer and
the last line is even above the bottom, i.e. there are some empty
lines displayed below the last line (e.g. if we have scrolled past the
last line via the mouse wheel), pressing PageDown not just moves the
cursor to the last line but also unexpectedly adjusts the view so that
the last line is exactly at the bottom.
2024-12-03 21:07:30 +01:00
Jöran Karl
2c4754d484
actions: Prevent additional cursor move down on Cursor(Page)Down
...
This is needed to not move two lines below the last visual selection when it
has end behind the new line character.
2024-12-03 20:38:34 +01:00
Jöran Karl
50639015d7
cursor: Remove selection reduction by one character on Deselect()
2024-11-30 15:25:14 +01:00
Jöran Karl
3a16197da7
actions: On Cursor(Page)Down with selection of newline place cursor to start
2024-11-26 20:12:43 +01:00
Oleksandr Redko
b881bf5606
Remove unused internal or unexported functions ( #3481 )
2024-11-16 21:19:37 +01:00