diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-09-22 20:36:26 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-10-01 13:45:00 +0100 |
| commit | 35559b65ddf107fea2a4dda92fcbd664986976d9 (patch) | |
| tree | 58840b2523abb01459afb09ad2480df07b9ddd2d /src/command_manager.hh | |
| parent | 6e17ecfb6eadc157cc5229f3c36f2962cfe1fcdf (diff) | |
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
Diffstat (limited to 'src/command_manager.hh')
| -rw-r--r-- | src/command_manager.hh | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |
