Return the word prefix before the cursor.
(self)
| 83 | return words |
| 84 | |
| 85 | def getprevword(self): |
| 86 | "Return the word prefix before the cursor." |
| 87 | line = self.text.get("insert linestart", "insert") |
| 88 | i = len(line) |
| 89 | while i > 0 and line[i-1] in self.wordchars: |
| 90 | i = i-1 |
| 91 | return line[i:] |
| 92 | |
| 93 | |
| 94 | if __name__ == '__main__': |
no test coverage detected