Commit 5db362fb authored by Michel Ludwig's avatar Michel Ludwig
Browse files

Use the correct line number in 'Part::showSourceLocation'

parent ab436aaa
......@@ -31,6 +31,9 @@ class OKULAR_EXPORT ViewerInterface
/**
* Show the specified source location centrally in the viewer.
*
* @param fileName source file name
* @param line in the source file, starts from 0
* @param column in the source file, starts from 0
* @param showGraphically controls whether the given source location will be
* shown graphically in the viewer (if that feature is globally activated)
*/
......
......@@ -836,7 +836,7 @@ KUrl Part::realUrl() const
void Part::showSourceLocation(const QString& fileName, int line, int column, bool showGraphically)
{
const QString u = QString( "src:%1 %2" ).arg( line ).arg( fileName );
const QString u = QString( "src:%1 %2" ).arg( line + 1 ).arg( fileName );
GotoAction action( QString(), u );
m_document->processAction( &action );
if( showGraphically )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment