Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching editor with F4 shouldn't pass line number #3117

Closed
mc-butler opened this issue Dec 3, 2013 · 7 comments
Closed

Launching editor with F4 shouldn't pass line number #3117

mc-butler opened this issue Dec 3, 2013 · 7 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3117
Reporter egmont (@egmontkob)

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.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 5, 2013 at 5:43 UTC (comment 1)

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

Branch: 3117_external_editor_line_number
Initial [e2175cf0c04b83651ec3d3f791e465d43f7eb12a]

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Dec 5, 2013 at 9:34 UTC (comment 2)

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

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 5, 2013 at 11:02 UTC (comment 2.3)

Replying to egmont:

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

Done.

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Jan 13, 2014 at 10:42 UTC (comment 4)

  • Votes set to slavazanko

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Jan 14, 2014 at 9:49 UTC (comment 5)

  • Branch state changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 14, 2014 at 10:27 UTC (comment 6)

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

Merged to master: [7c7ed5e].

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 14, 2014 at 10:29 UTC (comment 7)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants