[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106061: * xdisp.c (set_cursor_from_r
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106061: * xdisp.c (set_cursor_from_row): Simplify conditionals, |
Date: |
Tue, 11 Oct 2011 22:50:15 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106061
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2011-10-11 22:50:15 -0700
message:
* xdisp.c (set_cursor_from_row): Simplify conditionals,
to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
modified:
src/ChangeLog
src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-10-12 04:58:43 +0000
+++ b/src/ChangeLog 2011-10-12 05:50:15 +0000
@@ -1,5 +1,8 @@
2011-10-12 Paul Eggert <address@hidden>
+ * xdisp.c (set_cursor_from_row): Simplify conditionals,
+ to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
+
* lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
Some packages use them to denote characters with modifiers.
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2011-10-08 13:03:43 +0000
+++ b/src/xdisp.c 2011-10-12 05:50:15 +0000
@@ -13874,27 +13874,9 @@
glyph--;
}
}
- else if (match_with_avoid_cursor
- /* A truncated row may not include PT among its
- character positions. Setting the cursor inside the
- scroll margin will trigger recalculation of hscroll
- in hscroll_window_tree. But if a display string
- covers point, defer to the string-handling code
- below to figure this out. */
- || (!string_seen
- && ((row->truncated_on_left_p && pt_old < bpos_min)
- || (row->truncated_on_right_p && pt_old > bpos_max)
- /* Zero-width characters produce no glyphs. */
- || (!empty_line_p
- && (row->reversed_p
- ? glyph_after > glyphs_end
- : glyph_after < glyphs_end)))))
+ else if (match_with_avoid_cursor)
{
- if (!match_with_avoid_cursor
- && row->truncated_on_left_p && pt_old < bpos_min)
- cursor = glyph_before;
- else
- cursor = glyph_after;
+ cursor = glyph_after;
x = -1;
}
else if (string_seen)
@@ -14033,6 +14015,26 @@
&& row->continued_p)
return 0;
}
+ /* A truncated row may not include PT among its character positions.
+ Setting the cursor inside the scroll margin will trigger
+ recalculation of hscroll in hscroll_window_tree. But if a
+ display string covers point, defer to the string-handling
+ code below to figure this out. */
+ else if (row->truncated_on_left_p && pt_old < bpos_min)
+ {
+ cursor = glyph_before;
+ x = -1;
+ }
+ else if ((row->truncated_on_right_p && pt_old > bpos_max)
+ /* Zero-width characters produce no glyphs. */
+ || (!empty_line_p
+ && (row->reversed_p
+ ? glyph_after > glyphs_end
+ : glyph_after < glyphs_end)))
+ {
+ cursor = glyph_after;
+ x = -1;
+ }
}
compute_x:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106061: * xdisp.c (set_cursor_from_row): Simplify conditionals,,
Paul Eggert <=