mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
Allow optionally dropping anywhere
This commit is contained in:
@@ -128,7 +128,15 @@ func run_loop(opts *Options, drop_dests map[string]drop_dest, drag_sources map[s
|
||||
} else if move_button_region.has(cell_x, cell_y) {
|
||||
drop_status.action = move_on_drop
|
||||
} else {
|
||||
drop_status.action = 0
|
||||
switch opts.DropAnywhere {
|
||||
case "disallowed":
|
||||
drop_status.action = 0
|
||||
drop_status.accepted_mimes = nil
|
||||
case "copy":
|
||||
drop_status.action = copy_on_drop
|
||||
case "move":
|
||||
drop_status.action = move_on_drop
|
||||
}
|
||||
}
|
||||
drop_status.in_window = cell_x > -1 && cell_y > -1
|
||||
mimes_changed := !slices.Equal(prev_status.accepted_mimes, drop_status.accepted_mimes)
|
||||
|
||||
@@ -27,6 +27,14 @@ files to be overwritten. Note that confirmation is asked only for actual file co
|
||||
conflicting files are automatically created.
|
||||
|
||||
|
||||
--drop-anywhere
|
||||
choices=disallowed,copy,move
|
||||
default=disallowed
|
||||
type=choices
|
||||
Allow dropping anywhere, not just on the Copy or Move drop regions. Dropping anywhere will perform
|
||||
the specified action.
|
||||
|
||||
|
||||
--machine-id
|
||||
The machine id to use instead of the actual machine id.
|
||||
'''.format
|
||||
|
||||
Reference in New Issue
Block a user