Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Some line control characters are shown R console #322

Open
dongikjang opened this Issue · 3 comments

3 participants

@dongikjang

I an using SublimeREPL under Ubuntu 13.10.
The version of sublimetext is build 3059.

When "eval in REPL with selection",
"CR<" and "BEL" character string are added in the R console.
Furthermore, long input code line is truncated and print the initial input again with "CR<" character string
repl
.

I think line control characters are added automatically.

@vyakimov

I can confirm I am experiencing the same issue.

screen shot 2014-02-05 at 15 27 45

@nicholasbloom

As a holdover, add the following above self._view.run_command("repl_insert_text", {"pos": self._output_end, "text": unistr}) in sublimerepl.py (should be line ~320):

        brstr = re.compile(r'[\r\n]{1,2}<.*(?= {24})')
        try:
            lchar = brstr.finditer(unistr)
            for i in reversed(list(lchar)):
                rchar = i.group(0)[-1]
                unistr = brstr.sub(rchar, unistr)
        except:
            unistr=unistr

This will solve the carriage return garbling.

*edit: Better regex

@nicholasbloom

You can fix the BEL problem by setting "translate_tabs_to_spaces": true in your preferences file. Or by adding

unistr = re.sub(r'\a',r'\t', unistr)

above or below the lines in my first comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.