home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In clients, show text input cursor.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index d810c2e580aabb3f4cc1443d8ff040b4f657374a..26e6bf802f91389628bb286db555c2f64ca70a12 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-970,7
+970,7
@@
let tui = {
recalc_input_lines: function() {
if (this.mode.has_input_prompt) {
let _ = null;
recalc_input_lines: function() {
if (this.mode.has_input_prompt) {
let _ = null;
- [this.input_lines, _] = this.msg_into_lines_of_width(this.input_prompt + this.inputEl.value, this.window_width);
+ [this.input_lines, _] = this.msg_into_lines_of_width(this.input_prompt + this.inputEl.value
+ '█'
, this.window_width);
} else {
this.input_lines = [];
}
} else {
this.input_lines = [];
}
@@
-1055,7
+1055,7
@@
let tui = {
},
enter_ascii_art: function(command) {
if (this.inputEl.value.length != 6) {
},
enter_ascii_art: function(command) {
if (this.inputEl.value.length != 6) {
- this.log_msg('? wrong input length, try again');
+ this.log_msg('? wrong input length,
must be 6;
try again');
return;
}
this.log_msg(' ' + this.inputEl.value);
return;
}
this.log_msg(' ' + this.inputEl.value);
@@
-1554,7
+1554,7
@@
document.onclick = function() {
};
tui.inputEl.addEventListener('keydown', (event) => {
tui.show_help = false;
};
tui.inputEl.addEventListener('keydown', (event) => {
tui.show_help = false;
- if (
event.key == 'Enter'
) {
+ if (
['Enter', 'ArrowLeft', 'ArrowRight'].includes(event.key)
) {
event.preventDefault();
}
if ((!tui.mode.is_intro && event.key == 'Escape')
event.preventDefault();
}
if ((!tui.mode.is_intro && event.key == 'Escape')