Ticket #3117 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Launching editor with F4 shouldn't pass line number

Reported by: egmont Owned by: andrew_b
Priority: minor Milestone: 4.8.12
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Continuing from #3044:

When pressing F4 to start the editor, a "+1" argument is passed to open the file at the first line.

For some editor this is absolutely unnecessary since they open the file there anyways. For some others (at least "joe", but probably others too) this is harmful: joe has a convenience feature that by default it opens the file where it was last open, unless of course overridden from command line. Currently mc forces joe to open the file at the first line, although opening it where it was last open would be much more desired.

I think the right solution would be to consult mc.lib only when opening the viewer/editor through the "word search in files (M-?)" feature, and not when F3/F4 is pressed on a file, in the latter case $VIEWER or $EDITOR should simply be launched with the filename but no additional parameters.

Change History

comment:1 Changed 10 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review

Branch: 3117_external_editor_line_number
Initial changeset:e2175cf0c04b83651ec3d3f791e465d43f7eb12a

comment:2 follow-up: ↓ 3 Changed 10 years ago by egmont

Cool, thanks a lot, works as I imagined it :)

Maybe the help/man pages deserve a minor update too.

comment:3 in reply to: ↑ 2 Changed 10 years ago by andrew_b

Replying to egmont:

Maybe the help/man pages deserve a minor update too.

Done.

comment:4 Changed 10 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:5 Changed 10 years ago by slavazanko

  • Branch state changed from on review to approved

comment:6 Changed 10 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [7c7ed5ef0cda232a46f340372caf2e88e3f3a12f].

git log --pretty=oneline f949a29..7c7ed5e

comment:7 Changed 10 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.