[ghex] Fix cursor rendering at the end of the text buffer
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] Fix cursor rendering at the end of the text buffer
- Date: Sat, 30 Jul 2011 18:40:46 +0000 (UTC)
commit a77b746370d6e4bc6e164b2ab73dfe72db335af4
Author: Kalev Lember <kalevlember gmail com>
Date: Sat Jul 30 21:24:54 2011 +0300
Fix cursor rendering at the end of the text buffer
Instead of returning early from the text rendering functions when there
are no more characters in the buffer, just break out of the for loop and
go on with cursor rendering.
src/gtkhex.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 78ebe1c..5ced4c5 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -662,7 +662,7 @@ render_hex_lines (GtkHex *gh,
for(i = imin; i <= imax; i++) {
tmp = (gint)frm_len - (gint)((i - imin)*xcpl);
if(tmp <= 0)
- return;
+ break;
render_hex_highlights(gh, i);
cairo_move_to (cr, 0, i * gh->char_height);
@@ -706,7 +706,7 @@ render_ascii_lines (GtkHex *gh,
for(i = imin; i <= imax; i++) {
tmp = (gint)frm_len - (gint)((i - imin)*gh->cpl);
if(tmp <= 0)
- return;
+ break;
render_ascii_highlights(gh, i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]