fine-tuned the word deletion sensitivity
This commit is contained in:
parent
b0e08189c0
commit
4b66226302
3 changed files with 4 additions and 4 deletions
|
|
@ -20,7 +20,6 @@ import io.github.sspanak.tt9.ime.modes.InputMode;
|
|||
import io.github.sspanak.tt9.ime.modes.ModePredictive;
|
||||
import io.github.sspanak.tt9.languages.Language;
|
||||
import io.github.sspanak.tt9.languages.LanguageCollection;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||
import io.github.sspanak.tt9.ui.UI;
|
||||
import io.github.sspanak.tt9.util.Text;
|
||||
|
||||
|
|
@ -131,7 +130,7 @@ public abstract class TypingHandler extends KeyPadHandler {
|
|||
suggestionOps.commitCurrent(false);
|
||||
mInputMode.reset();
|
||||
|
||||
int prevChars = hold ? Math.min(Math.max(textField.getPaddedWordBeforeCursorLength(), 1), SettingsStore.BACKSPACE_ACCELERATION_MAX_CHARS) : 1;
|
||||
int prevChars = hold ? Math.max(textField.getPaddedWordBeforeCursorLength(), 1) : 1;
|
||||
textField.deleteChars(prevChars);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import io.github.sspanak.tt9.hacks.InputType;
|
|||
import io.github.sspanak.tt9.ime.modes.InputMode;
|
||||
import io.github.sspanak.tt9.languages.Language;
|
||||
import io.github.sspanak.tt9.languages.LanguageKind;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||
import io.github.sspanak.tt9.util.Logger;
|
||||
import io.github.sspanak.tt9.util.Text;
|
||||
|
||||
|
|
@ -137,7 +138,7 @@ public class TextField extends InputField {
|
|||
}
|
||||
|
||||
int spaceShift = Math.max(before.lastIndexOf(' '), 0);
|
||||
return before.length() - spaceShift;
|
||||
return Math.min(before.length() - spaceShift, (int) (SettingsStore.BACKSPACE_ACCELERATION_MAX_CHARS * 1.5));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ public class SettingsStore extends SettingsUI {
|
|||
public SettingsStore(Context context) { super(context); }
|
||||
|
||||
/************* internal settings *************/
|
||||
public static final int BACKSPACE_ACCELERATION_MAX_CHARS = 10;
|
||||
public static final int BACKSPACE_ACCELERATION_MAX_CHARS = 20;
|
||||
public static final int BACKSPACE_ACCELERATION_HARD_KEY_REPEAT_DEBOUNCE = 5;
|
||||
public final static int CLIPBOARD_PREVIEW_LENGTH = 20;
|
||||
public final static int CUSTOM_WORDS_IMPORT_MAX_LINES = 250;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue