clifm icon indicating copy to clipboard operation
clifm copied to clipboard

issues in using m (move) command

Open Docbroke opened this issue 2 years ago • 12 comments

I found some difficulties in using m command to change file name.

  1. Once you start changing file name, with m there is no way to cancel and go back to original name, other than typing it again.
  2. Sometimes ( I don't know how to reproduce), after m <file>, when I move to the beginning or middle of filename and start deleting/editing characters, suddenly cursor appears at different location editing something else in the filename.

Docbroke avatar Dec 12 '21 17:12 Docbroke

Hi @Docbroke,

  1. Partially true: delete whatever you typed so far (you can use Alt-c) and type q to cancel and exit. However, I admit there should be an easier, more intuitive way of editing/canceling/exit the rename prompt.
  2. Perhaps related to syntax highlighting.

I'll take a look at both issues. Thanks for reporting.

leo-arch avatar Dec 12 '21 17:12 leo-arch

Now Ctrl-x quits the rename prompt. Thought not perfect, you can undo changes pressing Ctrl-_ (Control plus underscore).

Sill wasn't able to reproduce the second issue.

leo-arch avatar Dec 12 '21 18:12 leo-arch

I think Esc or Ctrl-c to leave the rename prompt will be more intuitive. There is no need for undo, it would be easier to escape and rename again. Too many shortcuts are confusing. For second issue, try using files with longer names, may be filename spanning two lines. I still don't know how to consistently reproduce that.

Docbroke avatar Dec 12 '21 18:12 Docbroke

Esc looks fine. I'll try with multiline file names as well.

leo-arch avatar Dec 12 '21 18:12 leo-arch

The second issue (long file names) should be fixed now.

As to the Esc key, that's tricky: almost all keybindings (including the arrow keys) begin by the escape char (27 dec), so that using Esc to quit the rename prompt implies that you cannot move through the file name using the arrow keys (or jump to the beginning of the line by pressing Ctrl-a, and so on). For the time being, thereby, Ctrl-x remains (at least it's better than the old 'q').

leo-arch avatar Dec 12 '21 19:12 leo-arch

Ctrl-x doesn't work if Esc key is used before it. keys like arrow key, del, backspace have weird behavior if they are used immediately after Esc

Docbroke avatar Dec 13 '21 02:12 Docbroke

Ok. I'll take a look at it.

leo-arch avatar Dec 13 '21 02:12 leo-arch

After updating clifm today (after 4 days), I am getting seg faults with m sel or c sel.

Docbroke avatar Dec 29 '21 04:12 Docbroke

Ok, I'll fix it. Thanks for reporting Doc.

leo-arch avatar Dec 29 '21 05:12 leo-arch

Try now. It should be fixed.

leo-arch avatar Dec 29 '21 05:12 leo-arch

I'm refactoring some code blocks to remove, as much as possible, calls to the system shell: it's a security vulnerability. This is what caused the seg fault you reported. Right now refactoring Lira for the same reason.

leo-arch avatar Dec 29 '21 05:12 leo-arch

seg fault issue solved.

Docbroke avatar Dec 29 '21 06:12 Docbroke

Hey @Docbroke! Hope you're doing fine. This issue should be solved now. Could you please give it a try?

leo-arch avatar Oct 17 '22 19:10 leo-arch

Yes I am fine. This looks like fixed. closing this.

Docbroke avatar Oct 18 '22 10:10 Docbroke