From 35559b65ddf107fea2a4dda92fcbd664986976d9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 22 Sep 2016 20:36:26 +0100 Subject: Support codepoints of variable width Add a ColumnCount type and use it in place of CharCount whenever more appropriate, take column size of codepoints into account for vertical movements and docstring wrapping. Fixes #811 --- src/command_manager.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/command_manager.hh') diff --git a/src/command_manager.hh b/src/command_manager.hh index e9f5c5fc..563d5431 100644 --- a/src/command_manager.hh +++ b/src/command_manager.hh @@ -56,20 +56,20 @@ struct Token }; Token() : m_type(Type::Raw) {} - Token(Type type, ByteCount b, ByteCount e, CharCoord coord, String str = "") + Token(Type type, ByteCount b, ByteCount e, DisplayCoord coord, String str = "") : m_type(type), m_begin(b), m_end(e), m_coord(coord), m_content(std::move(str)) {} Type type() const { return m_type; } ByteCount begin() const { return m_begin; } ByteCount end() const { return m_end; } - CharCoord coord() const { return m_coord; } + DisplayCoord coord() const { return m_coord; } const String& content() const { return m_content; } private: Type m_type; ByteCount m_begin; ByteCount m_end; - CharCoord m_coord; + DisplayCoord m_coord; String m_content; }; @@ -111,7 +111,7 @@ private: void execute_single_command(CommandParameters params, Context& context, const ShellContext& shell_context, - CharCoord pos) const; + DisplayCoord pos) const; struct CommandDescriptor { -- cgit v1.2.3