Fixed isse with auto type skipping paste commands

Started implementing AutotypeFixDialog for 0.4.0 and 0.4.1 fix
Autotype candidate selection is shorter using subitems instead of single line
This commit is contained in:
michael starke
2014-03-26 22:29:45 +01:00
parent 478be2b9d9
commit edf4358388
12 changed files with 375 additions and 21 deletions

View File

@@ -124,8 +124,7 @@
}
NSRange pasteRange = NSMakeRange(lastLocation, commandRange.location - lastLocation);
if(pasteRange.length > 0) {
NSString *pasteValue = [context.evaluatedCommand substringWithRange:NSMakeRange(lastLocation, commandRange.location - lastLocation)];
// Determin if it's amodifier key, and collect them!
NSString *pasteValue = [context.evaluatedCommand substringWithRange:pasteRange];
[self appendPasteCommandForContent:pasteValue toCommands:commands];
}
}
@@ -138,6 +137,15 @@
}
lastLocation = commandRange.location + commandRange.length;
}
/* Collect any part that isn't a command or if onyl paste is used */
if(lastLocation < [context.evaluatedCommand length]) {
NSRange pasteRange = NSMakeRange(lastLocation, [context.evaluatedCommand length] - lastLocation);
if(pasteRange.length > 0) {
NSString *pasteValue = [context.evaluatedCommand substringWithRange:pasteRange];
[self appendPasteCommandForContent:pasteValue toCommands:commands];
}
}
return commands;
}