NppToR
NppToR copied to clipboard
Only first line of wrapped line is passed to R using F8
On the hope there may be some additional development of this application, I'm opening up a new issue specific to this problem.
When word-wrap is enabled in Notepad++, pressing F8 with the cursor anywhere on that line (whether on the first line of the wrapped line or not) sends only the first line (before the wrap) to R. In older versions of Notepad++, the whole wrapped line was sent as a single line. Furthermore, this causes R to wait for additional input, but placing the cursor on the second "line" of a wrapped line and pressing F8 will cause the first "line" to be sent again, rather than the second line. So it's not possible to send a wrapped line in multiple parts easily either. You must first select the whole wrapped line then press F8 to send it.
While Rstudio has improved over time, I still prefer Notepad++ plus NppToR for my R work. If this bug would be fixed it would make it much easier to work with.
Thanks!
I was able to fix this on my own system by modifying the source file "Notepad++Interface.ahk" and changing line 349 from:
sendevent {end}{home}{home}+{end}+{right}
to:
sendevent {end}{home}{home}+{end}+{end}+{right}
It just required adding a second end which captures the whole (wrapped) line instead of just the first line.
This seems to be working fine on my system and I was able to use the "Convert .ahk to .exe" utility that comes with autohotkey to convert to an exe. This seems to be okay for my use, and I was able to get it to use the NppToR icon but it doesn't use the correct icons when suspending or pausing.
I've never used Github so I don't know how to formally submit this as a patch. I also don't know how to build the complete install package from the modified source. I have a version with additional files that seem to be related to installation. I don't remember where I got it, but most likely from the old sourceforge site.
If the author is still monitoring this site, perhaps he'll be kind enough to update the official distribution with the fix.
If not, perhaps someone else can help to do this.
Thanks!
Excellent - thanks for your persistence on this, DrRZ. This is a little above my comfort/skill level, but I'm pleased to know there is a relatively easy fix. Here's hoping the author is reading this and can find a few minutes to implement it. =) NppToR is still by far the best tool for my workflow, even with this bug!