Show More
@@ -527,6 +527,12 b' class Completer(Configurable):' | |||
|
527 | 527 | 'information for experimental jedi integration.')\ |
|
528 | 528 | .tag(config=True) |
|
529 | 529 | |
|
530 | backslash_combining_completions = Bool(default=True, | |
|
531 | help="Control whether or not `\\thins<tab>` will attempt to rewrite using unicode" | |
|
532 | "that include completion of latex commands, unicode, or re-expand " | |
|
533 | "unicode to their ascii form").tag(config=True) | |
|
534 | ||
|
535 | ||
|
530 | 536 | |
|
531 | 537 | def __init__(self, namespace=None, global_namespace=None, **kwargs): |
|
532 | 538 | """Create a new completer for the command line. |
@@ -1742,16 +1748,18 b' class IPCompleter(Completer):' | |||
|
1742 | 1748 | if not text: |
|
1743 | 1749 | text = self.splitter.split_line(line_buffer, cursor_pos) |
|
1744 | 1750 | |
|
1745 | base_text = text if not line_buffer else line_buffer[:cursor_pos] | |
|
1746 | latex_text, latex_matches = self.latex_matches(base_text) | |
|
1747 | if latex_matches: | |
|
1748 |
|
|
|
1749 | name_text = '' | |
|
1750 | name_matches = [] | |
|
1751 | for meth in (self.unicode_name_matches, back_latex_name_matches, back_unicode_name_matches): | |
|
1752 |
|
|
|
1753 | if name_text: | |
|
1754 |
|
|
|
1751 | if self.backslash_combining_completions: | |
|
1752 | # allow deactivation of these on windows. | |
|
1753 | base_text = text if not line_buffer else line_buffer[:cursor_pos] | |
|
1754 | latex_text, latex_matches = self.latex_matches(base_text) | |
|
1755 | if latex_matches: | |
|
1756 | return latex_text, latex_matches, ['latex_matches']*len(latex_matches), () | |
|
1757 | name_text = '' | |
|
1758 | name_matches = [] | |
|
1759 | for meth in (self.unicode_name_matches, back_latex_name_matches, back_unicode_name_matches): | |
|
1760 | name_text, name_matches = meth(base_text) | |
|
1761 | if name_text: | |
|
1762 | return name_text, name_matches, [meth.__qualname__]*len(name_matches), {} | |
|
1755 | 1763 | |
|
1756 | 1764 | |
|
1757 | 1765 | # If no line buffer is given, assume the input text is all there was |
General Comments 0
You need to be logged in to leave comments.
Login now