aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 355454a4217..76578b8fde4 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -130,21 +130,27 @@ struct text_pos
130 130
131/* Increment text position POS. */ 131/* Increment text position POS. */
132 132
133#define INC_TEXT_POS(POS) \ 133#define INC_TEXT_POS(POS, MULTIBYTE_P) \
134 do \ 134 do \
135 { \ 135 { \
136 ++(POS).charpos; \ 136 ++(POS).charpos; \
137 INC_POS ((POS).bytepos); \ 137 if (MULTIBYTE_P) \
138 INC_POS ((POS).bytepos); \
139 else \
140 ++(POS).bytepos; \
138 } \ 141 } \
139 while (0) 142 while (0)
140 143
141/* Decrement text position POS. */ 144/* Decrement text position POS. */
142 145
143#define DEC_TEXT_POS(POS) \ 146#define DEC_TEXT_POS(POS, MULTIBYTE_P) \
144 do \ 147 do \
145 { \ 148 { \
146 --(POS).charpos; \ 149 --(POS).charpos; \
147 DEC_POS ((POS).bytepos); \ 150 if (MULTIBYTE_P) \
151 DEC_POS ((POS).bytepos); \
152 else \
153 --(POS).bytepos; \
148 } \ 154 } \
149 while (0) 155 while (0)
150 156