mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
Some cleanup and a fix for a potential crash while investigating #7572.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38858 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9fbfebb641
commit
80cb1f7674
@ -2188,8 +2188,8 @@ int BufferView::scrollUp(int offset)
|
|||||||
|
|
||||||
void BufferView::setCursorFromRow(int row)
|
void BufferView::setCursorFromRow(int row)
|
||||||
{
|
{
|
||||||
int tmpid = -1;
|
int tmpid;
|
||||||
int tmppos = -1;
|
int tmppos;
|
||||||
|
|
||||||
buffer_.texrow().getIdFromRow(row, tmpid, tmppos);
|
buffer_.texrow().getIdFromRow(row, tmpid, tmppos);
|
||||||
|
|
||||||
|
@ -2930,6 +2930,13 @@ bool GuiView::goToFileRow(string const & argument)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!buf) {
|
||||||
|
message(bformat(
|
||||||
|
_("No buffer for file `%1$s'."),
|
||||||
|
makeDisplayPath(file_name))
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
setBuffer(buf);
|
setBuffer(buf);
|
||||||
documentBufferView()->setCursorFromRow(row);
|
documentBufferView()->setCursorFromRow(row);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user