Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389497 - app-vim/vim-r-111014 appends "^A^K" when sending code from vim to R and results in an unusable setting
Summary: app-vim/vim-r-111014 appends "^A^K" when sending code from vim to R and resul...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 14:54 UTC by Xavier Fernández i Marín
Modified: 2011-11-17 16:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Fernández i Marín 2011-11-04 14:54:04 UTC
When sending code from vim to R, vim-r-111014 appends "^A^K" at the beginning of the code. This results in R not being able to understand the line and, hence, the script is unusable.

Example: trying to send a line (require(xtable)) with (\l) to R results in:
> ^A^Krequire(xtable)
Error: unexpected input in ""

Previous versions of r-vim did not have this behaviour.

Reproducible: Always

Steps to Reproduce:
1. Run vim opening an R file
2. Open R with "\rf"
3. Send a line from vim to R with "\l"
Actual Results:  
"^A^K" is appended at the beginning of the line


Expected Results:  
Not appending it

Using app-editors/vim 7.3.266
Comment 1 Tim Harder gentoo-dev 2011-11-04 18:20:26 UTC
The SendCmdToR function in the common_global.vim file seems to be causing this issue due to changes between versions. Are you using app-vim/conque or app-vim/screen?

You should probably also report this upstream if you haven't done so yet.
Comment 2 Xavier Fernández i Marín 2011-11-04 18:33:22 UTC
I am using app-vim/screen.

Thank you for taking care of it. I will try to report it upstream.
Comment 3 Tim Harder gentoo-dev 2011-11-04 18:40:14 UTC
You could try replacing the line "if g:vimrplugin_conqueplugin" with "if g:vimrplugin_conqueplugin || g:vimrplugin_screenplugin" in the SendCmdToR function from the common_global.vim file, but I'm just guessing since I don't use the screen plugin.

If that doesn't work reverting the line 'let cmd = "\001" . "\013" . a:cmd' to 'let cmd = "\013" . "\025" . a:cmd' should work, but yes please report this upstream as a github issue and mention that you're using the screen plugin.

Linking the upstream issue URL to this bug to this bug would be good to do as well. Thanks.
Comment 4 Xavier Fernández i Marín 2011-11-04 21:16:44 UTC
Works.

Changing "if g:vimrplugin_conqueplugin" with "if g:vimrplugin_conqueplugin || g:vimrplugin_screenplugin" in the SendCmdToR function solves the issue.

I have reported it upstream and will let them know.

Thank you.
Comment 5 Tim Harder gentoo-dev 2011-11-17 16:37:03 UTC
This should be fixed in vim-r-111114 now in CVS. Thanks for reporting it upstream.