Bug 333122 - Open files on a specific line not possible
Summary: Open files on a specific line not possible
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 4.6.0
Platform: unspecified Linux
: NOR normal
Target Milestone: 4.6.1
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs, regression
Depends on:
Blocks:
 
Reported: 2014-04-06 12:05 UTC by Jörg Afflerbach
Modified: 2015-10-11 14:51 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Afflerbach 2014-04-06 12:05:11 UTC
KDevelop misses the option to open a file on a specific line. This is essential for one-click setups like http://pla.nette.org/en/how-open-files-in-ide-from-debugger#toc-linux

Almost every editor offers that option, e.g. --line NNN in Kate or +NNN in Vim. KDevelop uses :NNN which seems to be broken.

Reproducible: Always

Steps to Reproduce:
On the command line, try to open a file in KDevelop and immediately jump to a specific line.



Actual Results:  
$ kdevelop myfile:10 

opens myfile on line number 11 (!). Looks like a classical off-by-one-mistake ;)
... but only if KDevelop is not already running. 

When KDevelop is already running, each time you do that, it opens the file again in a new tab and places the cursor in line number 1.

Expected Results:  
KDevelop should offer a command line option like the ones described above that makes it open a file and places the cursor on the given line. 

If the file is already open in a tab, KDevelop should NOT open it again, but simply bring its tab to the front and then place the cursor on the given line.
Comment 1 Sven Brauch 2015-10-11 14:51:00 UTC
The two complaints are fixed, the wish to have an extra option is imo not that valid; you can do your setup just fine with the : syntax. If you have a good reason to have the extra CLI option, feel free to reopen this.