Skip to content

Commit 29408c7

Browse files
committed
1 parent 03087e7 commit 29408c7

File tree

3 files changed

+562
-3
lines changed

3 files changed

+562
-3
lines changed

src/frontend/terminaloverlay.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <limits.h>
3838

3939
#include "terminaloverlay.h"
40+
#include "widechar_width.h"
4041

4142
using namespace Overlay;
4243

@@ -261,7 +262,7 @@ void NotificationEngine::apply( Framebuffer &fb ) const
261262
}
262263

263264
wchar_t ch = *i;
264-
int chwidth = ch == L'\0' ? -1 : wcwidth( ch );
265+
int chwidth = ch == L'\0' ? -1 : widechar_wcwidth( ch );
265266
Cell *this_cell = 0;
266267

267268
switch ( chwidth ) {
@@ -743,7 +744,7 @@ void PredictionEngine::new_user_byte( char the_byte, const Framebuffer &fb )
743744
}
744745
}
745746
}
746-
} else if ( (ch < 0x20) || (wcwidth( ch ) != 1) ) {
747+
} else if ( (ch < 0x20) || (widechar_wcwidth( ch ) != 1) ) {
747748
/* unknown print */
748749
become_tentative();
749750
// fprintf( stderr, "Unknown print 0x%x\n", ch );

src/terminal/terminal.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <typeinfo>
3838

3939
#include "terminal.h"
40+
#include "widechar_width.h"
4041

4142
using namespace Terminal;
4243

@@ -66,7 +67,7 @@ void Emulator::print( const Parser::Print *act )
6667
* Check for printing ISO 8859-1 first, it's a cheap way to detect
6768
* some common narrow characters.
6869
*/
69-
const int chwidth = ch == L'\0' ? -1 : ( Cell::isprint_iso8859_1( ch ) ? 1 : wcwidth( ch ));
70+
const int chwidth = ch == L'\0' ? -1 : ( Cell::isprint_iso8859_1( ch ) ? 1 : widechar_wcwidth( ch ));
7071

7172
Cell *this_cell = fb.get_mutable_cell();
7273

0 commit comments

Comments
 (0)