[dmdirc commit] r5827 - in trunk/src/com/dmdirc/ui/input: . tabstyles

1 view
Skip to first unread message

com...@dmdirc.com

unread,
Jan 24, 2010, 11:27:07 AM1/24/10
to dmd...@googlegroups.com
Author: demented-idiot
Date: 2010-01-24 16:27:05 +0000 (Sun, 24 Jan 2010)
New Revision: 5827

Modified:
trunk/src/com/dmdirc/ui/input/InputHandler.java
trunk/src/com/dmdirc/ui/input/tabstyles/TabCompletionStyle.java
Log:
passes shiftPressed boolean around related to issue 643 (http://bugs.dmdirc.com/view/643)

Git-version: 0.6.3m2-364-ge6d54da


Modified: trunk/src/com/dmdirc/ui/input/InputHandler.java
===================================================================
--- trunk/src/com/dmdirc/ui/input/InputHandler.java 2010-01-24 15:32:04 UTC (rev 5826)
+++ trunk/src/com/dmdirc/ui/input/InputHandler.java 2010-01-24 16:27:05 UTC (rev 5827)
@@ -399,7 +399,7 @@
* Handles tab completion of a string. Called when the user presses
* (shift) tab.
*
- * @param shiftPressed True iif shift is pressed
+ * @param shiftPressed True if shift is pressed
*/
protected void doTabCompletion(final boolean shiftPressed) {
if (tabCompleter == null || (flags & HANDLE_TABCOMPLETION) == 0) {
@@ -413,7 +413,7 @@
LOGGER.finer("Text for tab completion: " + text);

if (text.isEmpty()) {
- doNormalTabCompletion(text, 0, 0, null);
+ doNormalTabCompletion(text, 0, 0, shiftPressed, null);
return;
}

@@ -441,9 +441,9 @@
LOGGER.finer("Offsets: start: " + start + ", end: " + end);

if (start > 0 && text.charAt(0) == CommandManager.getCommandChar()) {
- doCommandTabCompletion(text, start, end);
+ doCommandTabCompletion(text, start, end, shiftPressed);
} else {
- doNormalTabCompletion(text, start, end, null);
+ doNormalTabCompletion(text, start, end, shiftPressed, null);
}
}

@@ -455,8 +455,8 @@
* @param end The end index of the word we're completing
*/
private void doCommandTabCompletion(final String text, final int start,
- final int end) {
- doNormalTabCompletion(text, start, end,
+ final int end, final boolean shiftPressed) {
+ doNormalTabCompletion(text, start, end, shiftPressed,
TabCompleter.getIntelligentResults(text.substring(0, start)));
}

@@ -469,9 +469,10 @@
* @param additional A list of additional strings to use
*/
private void doNormalTabCompletion(final String text, final int start,
- final int end, final AdditionalTabTargets additional) {
+ final int end, final boolean shiftPressed,
+ final AdditionalTabTargets additional) {
final TabCompletionResult res = style.getResult(text, start, end,
- additional);
+ shiftPressed, additional);

if (res != null) {
target.setText(res.getText());

Modified: trunk/src/com/dmdirc/ui/input/tabstyles/TabCompletionStyle.java
===================================================================
--- trunk/src/com/dmdirc/ui/input/tabstyles/TabCompletionStyle.java 2010-01-24 15:32:04 UTC (rev 5826)
+++ trunk/src/com/dmdirc/ui/input/tabstyles/TabCompletionStyle.java 2010-01-24 16:27:05 UTC (rev 5827)
@@ -42,6 +42,7 @@
* @return This style's proposed result
*/
TabCompletionResult getResult(final String original, final int start,
- final int end, final AdditionalTabTargets additional);
+ final int end, final boolean shiftPressed,
+ final AdditionalTabTargets additional);

}
\ No newline at end of file

com...@dmdirc.com

unread,
Jan 24, 2010, 11:28:04 AM1/24/10
to dmd...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages