]> git.lyx.org Git - features.git/blobdiff - src/screen.C
Dekel language/encoding patch + a few fixes
[features.git] / src / screen.C
index 477dba02798724c8505d9ff8b753a02907fb06c5..2e29133e4330aacd32b40988ea3cb43dd33e35c0 100644 (file)
@@ -125,9 +125,10 @@ void LyXScreen::DrawOneRow(LyXText * text, Row * row, int y_text,
                           int y_offset, int x_offset)
 {
        int y = y_text - text->first + y_offset;
-      
-       if (y + row->height() > 0
-           && y - row->height() <= owner.height()) {
+
+       if (((y+row->height()) > 0) &&
+           ((y-row->height()) <= (int)owner.height()))
+       {
                // ok there is something visible
                LyXText::text_status st = text->status;
                do {
@@ -201,9 +202,9 @@ void LyXScreen::ShowCursor(LyXText const * text)
        if (!cursor_visible) {
                Cursor_Shape shape = BAR_SHAPE;
                if (text->real_current_font.language() !=
-                   owner.owner()->buffer()->params.language_info
+                   owner.owner()->buffer()->params.language
                    || text->real_current_font.isVisibleRightToLeft()
-                   != owner.owner()->buffer()->params.language_info->RightToLeft())
+                   != owner.owner()->buffer()->params.language->RightToLeft())
                        shape = (text->real_current_font.isVisibleRightToLeft())
                                ? REVERSED_L_SHAPE : L_SHAPE;
                ShowManualCursor(text, text->cursor.x(), text->cursor.y(),
@@ -222,14 +223,14 @@ bool LyXScreen::FitManualCursor(LyXText * text,
   
        if (y + desc - text->first >= owner.height())
                newtop = y - 3 * owner.height() / 4;  // the scroll region must be so big!!
-       else if (y - asc < text->first
+       else if (y - asc < (int)text->first
                && text->first > 0) {
                newtop = y - owner.height() / 4;
        }
 
        newtop = max(newtop, 0); // can newtop ever be < 0? (Lgb)
   
-       if (newtop != text->first) {
+       if (newtop != (int)text->first) {
                Draw(text, newtop);
                text->first = newtop;
                return true;