Add goto column number command line arg to complement goto line number

When specifying a filename as an argument, you can append a colon (or a
plus) followed by a number to indicate which line the cursor should be
positioned at in that file. This patch adds the same functionality but
for the column position as well. Ex: main.cpp:5:4 would open main.cpp
and put the cursor at line 5 column 4. The column number is optional,
just like the line number before it. It should be noted that specified
column numbers larger than the amount of characters available on that
line are wrapped onto subsequent lines.

Change-Id: I50208500fa43e43a9514d2be21630b3c607119a6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
d3fault
2015-03-05 17:43:11 -07:00
committed by hjk
parent 2fb9c3c7ab
commit 44e7eca559
9 changed files with 33 additions and 16 deletions

View File

@@ -229,7 +229,7 @@ bool CorePlugin::delayedInitialize()
QObject *CorePlugin::remoteCommand(const QStringList & /* options */, const QStringList &args)
{
IDocument *res = m_mainWindow->openFiles(
args, ICore::OpenFilesFlags(ICore::SwitchMode | ICore::CanContainLineNumbers));
args, ICore::OpenFilesFlags(ICore::SwitchMode | ICore::CanContainLineAndColumnNumbers));
m_mainWindow->raiseWindow();
return res;
}