Alfredo's getchar fix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6737 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-04-08 18:51:27 +00:00
parent 84588694c0
commit b50525dffb
2 changed files with 7 additions and 2 deletions

View File

@ -712,8 +712,9 @@ bool BufferView::lockInset(UpdatableInset * inset)
if (!theLockingInset()) { if (!theLockingInset()) {
// first check if it's the inset under the cursor we want lock // first check if it's the inset under the cursor we want lock
// should be most of the time // should be most of the time
char const c = text->cursor.par()->getChar(text->cursor.pos()); if (text->cursor.pos() < text->cursor.par()->size()
if (c == Paragraph::META_INSET) { && text->cursor.par()->getChar(text->cursor.pos()) ==
Paragraph::META_INSET) {
Inset * in = text->cursor.par()->getInset(text->cursor.pos()); Inset * in = text->cursor.par()->getInset(text->cursor.pos());
if (inset == in) { if (inset == in) {
theLockingInset(inset); theLockingInset(inset);

View File

@ -1,3 +1,7 @@
2003-04-08 Alfredo Braunstein <abraunst@libero.it>
* BufferView.C (lockInset): another bad getchar crunched
2003-04-08 Alfredo Braunstein <abraunst@libero.it> 2003-04-08 Alfredo Braunstein <abraunst@libero.it>
* text2.C (changeDepth): do not setUndo on test_only (make undo work * text2.C (changeDepth): do not setUndo on test_only (make undo work