Bug 333122

Summary: Open files on a specific line not possible
Product: [Applications] kdevelop Reporter: Jörg Afflerbach <nospam>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: ajaynair59, kfunk, mail, san13692
Priority: NOR Keywords: junior-jobs, regression
Version: 4.6.0   
Target Milestone: 4.6.1   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

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.