Skip to content
Snippets Groups Projects
Commit 9df6e910 authored by Silas Dohm's avatar Silas Dohm
Browse files

backspace now stops after reaching first letter of word

parent 8cddd2cb
No related branches found
No related tags found
No related merge requests found
......@@ -154,7 +154,13 @@ function logKey(e) {
activeMode = mode.visual;
else if (e.key == "Backspace") {
activeCell.currentChar = "";
activeCell = m_orientation ? activeCell.neighbour[1] : activeCell.neighbour[0];
if(m_orientation && activeCell.word[m_orientation] == activeCell.neighbour[1].word[m_orientation]){
activeCell = activeCell.neighbour[1];
}
else if(!m_orientation && activeCell.word[m_orientation] == activeCell.neighbour[0].word[m_orientation]){
activeCell = activeCell.neighbour[0];
}
// activeCell = m_orientation ? activeCell.neighbour[1] : activeCell.neighbour[0];
}
else if (e.keyCode > 64 && e.keyCode < 91) {
activeCell.currentChar = e.key;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment