| 360 | self.editwin = editwin |
| 361 | |
| 362 | def toggle_tabs_event(self, event): |
| 363 | editwin = self.editwin |
| 364 | usetabs = editwin.usetabs |
| 365 | if askyesno( |
| 366 | "Toggle tabs", |
| 367 | "Turn tabs " + ("on", "off")[usetabs] + |
| 368 | "?\nIndent width " + |
| 369 | ("will be", "remains at")[usetabs] + " 8." + |
| 370 | "\n Note: a tab is always 8 columns", |
| 371 | parent=editwin.text): |
| 372 | editwin.usetabs = not usetabs |
| 373 | # Try to prevent inconsistent indentation. |
| 374 | # User must change indent width manually after using tabs. |
| 375 | editwin.indentwidth = 8 |
| 376 | return "break" |
| 377 | |
| 378 | def change_indentwidth_event(self, event): |
| 379 | editwin = self.editwin |