Added
Link Here
|
1 |
--- libs/gccv/text.cc.orig 2024-09-02 15:25:20 UTC |
2 |
+++ libs/gccv/text.cc |
3 |
@@ -1126,7 +1126,7 @@ bool Text::OnKeyPressed (GdkEventKey *event) |
4 |
if (event->state & GDK_CONTROL_MASK) { |
5 |
/* move to end of word */ |
6 |
char const* s = m_Text.c_str (); |
7 |
- char *p = g_utf8_next_char (s + m_CurPos); |
8 |
+ char *p = const_cast<char*>(g_utf8_next_char (s + m_CurPos)); |
9 |
while (*p && (!g_unichar_isgraph (g_utf8_get_char(p)) || g_unichar_ispunct (g_utf8_get_char(p)))) |
10 |
p = g_utf8_next_char (p); |
11 |
while (g_unichar_isgraph (g_utf8_get_char(p)) && !g_unichar_ispunct (g_utf8_get_char(p))) |
12 |
@@ -1137,7 +1137,7 @@ bool Text::OnKeyPressed (GdkEventKey *event) |
13 |
Invalidate (); |
14 |
} else { |
15 |
char const* s = m_Text.c_str (); |
16 |
- char *p = g_utf8_next_char (s + m_CurPos); |
17 |
+ char *p = const_cast<char*>(g_utf8_next_char (s + m_CurPos)); |
18 |
if (!p) |
19 |
break; |
20 |
m_CurPos = p - s; |
21 |
@@ -1224,7 +1224,7 @@ bool Text::OnKeyPressed (GdkEventKey *event) |
22 |
if (m_CurPos == m_Text.length ()) |
23 |
break; |
24 |
char const* s = m_Text.c_str (); |
25 |
- char *p = g_utf8_next_char (s + m_CurPos); |
26 |
+ char *p = const_cast<char*>(g_utf8_next_char (s + m_CurPos)); |
27 |
int new_pos = p - s; |
28 |
ReplaceText (empty_st, m_CurPos, new_pos - m_CurPos); |
29 |
if (client) |