When we are in Vi digraph mode, put a question mark underneath the
        cursor.
197568
def _highlight_digraph(self, cli, new_screen):
        
        digraph_char = self._get_digraph_char(cli)
        if digraph_char:
            cpos = new_screen.cursor_position
            new_screen.data_buffer[cpos.y][cpos.x] = \
                _CHAR_CACHE[digraph_char, Token.Digraph]
70486
def insert_line_above(self, copy_margin=True):
        
        if copy_margin:
            insert = self.document.leading_whitespace_in_current_line + '\n'
        else:
            insert = '\n'

        self.cursor_position += self.document.get_start_of_line_position()
        self.insert_text(insert)
        self.cursor_position -= 1
411681
def tooltip_queries(self, item, x_coord, y_coord, key_mode, tooltip, text):
        
        tooltip.set_text(text)
        return True
961316
def _onNextBookmark(self):
        
        for block in qutepart.iterateBlocksFrom(self._qpart.textCursor().block().next()):
            if self.isBlockMarked(block):
                self._qpart.setTextCursor(QTextCursor(block))
                return
307891
def underline(self, action):
        '''
        '''
        if action == 'off':
            action = '0'
            self.send(chr(27)+chr(45)+action)
        else:
            self.send(chr(27)+chr(45)+action)
32396
def question_mark(self):
        
        ret = []
        if self.param_help_msg or len(self.subcommands) == 0:
            ret.append(self._quick_help())

        if len(self.subcommands) > 0:
            for k, _ in sorted(self.subcommands.items()):
                command_path, param_help, cmd_help = \
                    self._instantiate_subcommand(k)._quick_help(nested=True)
                if command_path or param_help or cmd_help:
                    ret.append((command_path, param_help, cmd_help))

        return (
            CommandsResponse(STATUS_OK, self.help_formatter(ret)),
            self.__class__
        )
697618
def graphviz_dot(sentence, font="Arial", colors=BLUE):
    
    s  = 'digraph sentence {\n'
    s += '\tranksep=0.75;\n'
    s += '\tnodesep=0.15;\n'
    s += '\tnode [penwidth=1, fontname="%s", shape=record, margin=0.1, height=0.35];\n' % font
    s += '\tedge [penwidth=1];\n'
    s += '\t{ rank=same;\n'
    # Create node groups for words, chunks and PNP chunks.
    for w in sentence.words:
        s += '\t\tword%s [label="<f0>%s|<f1>%s"%s];\n' % (w.index, w.string, w.type, _colorize(w, colors))
    for w in sentence.words[:-1]:
        # Invisible edges forces the words into the right order:
        s += '\t\tword%s -> word%s [color=none];\n' % (w.index, w.index+1)
    s += '\t}\n'
    s += '\t{ rank=same;\n'        
    for i, ch in enumerate(sentence.chunks):
        s += '\t\tchunk%s [label="<f0>%s"%s];\n' % (i+1, "-".join([x for x in (
            ch.type, ch.role, str(ch.relation or '')) if x]) or '-', _colorize(ch, colors))
    for i, ch in enumerate(sentence.chunks[:-1]):
        # Invisible edges forces the chunks into the right order:
        s += '\t\tchunk%s -> chunk%s [color=none];\n' % (i+1, i+2)
    s += '}\n'
    s += '\t{ rank=same;\n'
    for i, ch in enumerate(sentence.pnp):
        s += '\t\tpnp%s [label="<f0>PNP"%s];\n' % (i+1, _colorize(ch, colors))
    s += '\t}\n'
    s += '\t{ rank=same;\n S [shape=circle, margin=0.25, penwidth=2]; }\n'
    # Connect words to chunks.
    # Connect chunks to PNP or S.
    for i, ch in enumerate(sentence.chunks):
        for w in ch:
            s += '\tword%s -> chunk%s;\n' % (w.index, i+1)
        if ch.pnp:
            s += '\tchunk%s -> pnp%s;\n' % (i+1, sentence.pnp.index(ch.pnp)+1)
        else:
            s += '\tchunk%s -> S;\n' % (i+1)
        if ch.type == 'VP':
            # Indicate related chunks with a dotted
            for r in ch.related:
                s += '\tchunk%s -> chunk%s [style=dotted, arrowhead=none];\n' % (
                    i+1, sentence.chunks.index(r)+1)
    # Connect PNP to anchor chunk or S.
    for i, ch in enumerate(sentence.pnp):
        if ch.anchor:
            s += '\tpnp%s -> chunk%s;\n' % (i+1, sentence.chunks.index(ch.anchor)+1)
            s += '\tpnp%s -> S [color=none];\n' % (i+1)
        else:
            s += '\tpnp%s -> S;\n' % (i+1)
    s += "}"
    return s
693935
private void highlightText(int start) {
        editor.setCaretPosition(editor.getText().length());
        editor.moveCaretPosition(start);
    }
172517
def dot_format(out, graph, name="digraph"):
    """"""

    out.write("digraph %s {\n" % name)
    for step, deps in each_step(graph):
        for dep in deps:
            out.write("  \"%s\" -> \"%s\";\n" % (step, dep))

    out.write("}\n")
58317
def focus_prev_matching(self, querystring):
        """"""
        self.focus_property(lambda x: x._message.matches(querystring),
                            self._tree.prev_position)
1005244
def inline_query(self):
        """"""
        if isinstance(self.button, types.KeyboardButtonSwitchInline):
            return self.button.query
9311
def _question_line(self, section):
        """"""

        token = self.tok.get(want_leading = True)
        if not token.is_whitespace():
            self.last_name = dns.name.from_text(token.value, None)
        name = self.last_name
        token = self.tok.get()
        if not token.is_identifier():
            raise dns.exception.SyntaxError
        # Class
        try:
            rdclass = dns.rdataclass.from_text(token.value)
            token = self.tok.get()
            if not token.is_identifier():
                raise dns.exception.SyntaxError
        except dns.exception.SyntaxError:
            raise dns.exception.SyntaxError
        except Exception:
            rdclass = dns.rdataclass.IN
        # Type
        rdtype = dns.rdatatype.from_text(token.value)
        self.message.find_rrset(self.message.question, name,
                                rdclass, rdtype, create=True,
                                force_unique=True)
        if self.updating:
            self.zone_rdclass = rdclass
        self.tok.get_eol()
535427
def confirm(self, question, default=False, true_answer_regex="(?i)^y"):
        
        return self._io.confirm(question, default, true_answer_regex)
722413
protected void scrollUpSubtitles (int dy)
    {
        // dirty and move all the old glyphs
        Rectangle vbounds = _target.getViewBounds();
        int miny = vbounds.y + vbounds.height - _subtitleHeight;
        for (Iterator<ChatGlyph> iter = _subtitles.iterator(); iter.hasNext();) {
            ChatGlyph sub = iter.next();
            sub.translate(0, dy);
            if (sub.getBounds().y <= miny) {
                iter.remove();
                _target.abortAnimation(sub);
            }
        }
    }
151065
private void scanTwoDigitSpecial() {

        if (mInput == '=' && (mType == TokenType.COMP || mType == TokenType.EQ || mType == TokenType.N_EQ)) {
            mOutput.append(mInput);
            mPos++;
        } else if (mInput == '/' && (mType == TokenType.SLASH)) {
            mOutput.append(mInput);
            mType = TokenType.DESC_STEP;
            mPos++;
        } else if (mInput == '.' && (mType == TokenType.POINT)) {
            mOutput.append(mInput);
            mType = TokenType.PARENT;
            mPos++;
        } else if (mInput == '<' && mOutput.toString().equals("<")) {
            mOutput.append(mInput);
            mType = TokenType.L_SHIFT;
            mPos++;
        } else if (mInput == '>' && mOutput.toString().equals(">")) {
            mOutput.append(mInput);
            mType = TokenType.R_SHIFT;
            mPos++;
        } else if (mInput == ':' && mType == TokenType.OPEN_BR) {
            // could be start of a comment
            mOutput = new StringBuilder();
            mType = TokenType.COMMENT;
            mCommentCount++;
            mState = State.COMMENT;
            mPos++;
        } else {
            mFinnished = true;
        }
    }
1059464
public function askCommand(): void
    {
        $a = Interact::ask('you name is: ', '', function ($val, &$err) {
            if (!preg_match('/^\w{2,}$/', $val)) {
                $err = 'Your input must match /^\w{2,}$/';
                return false;
            }

            return true;
        });

        $this->write('Your answer is: ' . $a);
    }
682086
def lf (self):
        '''
        '''

        old_r = self.cur_r
        self.cursor_down()
        if old_r == self.cur_r:
            self.scroll_up ()
            self.erase_line()