From a02c89a8e8f6abe8935f6cf95e0b016d1ac40a34 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 19 Dec 2015 23:21:07 +0000 Subject: Use MB_CUR_MAX when calculating cursor position --- src/ui/inputwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index a6711bab..d5643f76 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -311,7 +311,7 @@ _inp_offset_to_col(char *str, int offset) while (i < offset && str[i] != '\0') { gunichar uni = g_utf8_get_char(&str[i]); - size_t ch_len = mbrlen(&str[i], 4, NULL); + size_t ch_len = mbrlen(&str[i], MB_CUR_MAX, NULL); i += ch_len; col++; if (g_unichar_iswide(uni)) { -- cgit 1.4.1-2-gfad0 49a559d2b77e3e4f6f676ba331bf8ef3b85d74'>this commit mirror of ranger - a simple, vim-like file managerakspecs <akspecs@tilde.institute>
summary refs log tree commit diff stats
path: root/ranger/fsobject/file.py
blob: 57d82b31068479d85a12b613b8d08b306afec1f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105