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/keys.cc | |
| 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/keys.cc')
| -rw-r--r-- | src/keys.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keys.cc b/src/keys.cc index 91917ee0..e353ecbc 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -115,7 +115,7 @@ String key_to_str(Key key) { if (key.modifiers & Key::Modifiers::MouseEvent) { - const auto coord = key.coord() + CharCoord{1,1}; + const auto coord = key.coord() + DisplayCoord{1,1}; switch (key.modifiers) { case Key::Modifiers::MousePos: @@ -133,7 +133,7 @@ String key_to_str(Key key) } else if (key.modifiers == Key::Modifiers::Resize) { - auto size = key.coord() + CharCoord{1,1}; + auto size = key.coord() + DisplayCoord{1,1}; return format("<resize:{}.{}>", size.line, size.column); } |
