#35 CJK in editor working
[fanfix.git] / src / jexer / TEditorWidget.java
index 94f1a3be545b2a401f8e32d2920faf3268c5fc1a..8b105f8ba62bb2d3222590eceb28d82ab6c57229 100644 (file)
@@ -3,7 +3,7 @@
  *
  * The MIT License (MIT)
  *
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -247,7 +247,9 @@ public class TEditorWidget extends TWidget {
         } else if (keypress.equals(kbDel)) {
             document.del();
             alignCursor();
-        } else if (keypress.equals(kbBackspace)) {
+        } else if (keypress.equals(kbBackspace)
+            || keypress.equals(kbBackspaceDel)
+        ) {
             document.backspace();
             alignTopLine(false);
         } else if (keypress.equals(kbTab)) {
@@ -265,6 +267,7 @@ public class TEditorWidget extends TWidget {
             && !keypress.getKey().isCtrl()
         ) {
             // Plain old keystroke, process it
+            // TODO: fix document to use ints, not chars
             document.addChar(keypress.getKey().getChar());
             alignCursor();
         } else {