Well, I don't know what "2170" and "2327" messages mean, but coincidentally there are 3 of "2170" and 2 of "2327", just like the 3 spaces and 2 tabs inserted in the text... :-/
Cheers,
Roger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh yeah it's definitely a bug. It's existed for over a year and still not been fixed. If it's a simple replacement as janschreiber suggested, it would be nice to finally fix it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-10-28
Yeah... Indeed it seems a bug to me.
I found also two tickets in bug tracker related to this issue:
[2062701] "Trim trailing space and save" inserts tab
[1927783] macro trailing spaces & save
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use this replacement, and it has worked fine so far:
<Macros>
<Macro name="&Trim trailing whitespace and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
<Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
</Macro>
</Macros>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After some delay, its fixed on the SVN, expect it to be in the next release (however, if you already have npp installed, I dont think the installer will touch shortcuts.xml if it is already present).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-06-26
Many thanks, Harry...
It's working fine now..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi...
If I use this macro command with the cursor inside a word, Notepad++ will insert 3 spaces and 2 tab character
How to test:
1) Create a new file and save it as "example.txt"
2) Write the following sentence (where <space> means the space character):
foobar<space><space>
3) Leave the cursor between "foo" and "bar": ( | represents the cursor):
foo|bar<space><space>
4) Use the "Trim Trailing and Save"
As you will notice, Notepad++ get rids of the trailing space, but introduces some other characters:
foo<space><space><space><tab><tab>bar<end of line>
I did a quick search though the source code and found this configuration inside shortcuts.xml:
<Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
<Action type="1" message="2170" wParam="0" lParam="0" sParam=" " />
<Action type="1" message="2170" wParam="0" lParam="0" sParam=" " />
<Action type="1" message="2170" wParam="0" lParam="0" sParam=" " />
<Action type="0" message="2327" wParam="0" lParam="0" sParam="" />
<Action type="0" message="2327" wParam="0" lParam="0" sParam="" />
<Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
</Macro>
Well, I don't know what "2170" and "2327" messages mean, but coincidentally there are 3 of "2170" and 2 of "2327", just like the 3 spaces and 2 tabs inserted in the text... :-/
Cheers,
Roger
There is no need to edit shortcuts.xml: the macro posted by Harry simply reads:
Edit -> Trim Trailing Space
File -> Save
You can consider the macro being shipped as only a test.
CChris
I've posted about this problem before but there was no answer ever - https://sourceforge.net/forum/message.php?msg_id=5368191
My guess is that this macro is just to show how things work and not really ment for normal usage.
But I still think this is a bug.
Oh yeah it's definitely a bug. It's existed for over a year and still not been fixed. If it's a simple replacement as janschreiber suggested, it would be nice to finally fix it.
Yeah... Indeed it seems a bug to me.
I found also two tickets in bug tracker related to this issue:
[2062701] "Trim trailing space and save" inserts tab
[1927783] macro trailing spaces & save
I use this replacement, and it has worked fine so far:
<Macros>
<Macro name="&Trim trailing whitespace and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
<Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
</Macro>
</Macros>
After some delay, its fixed on the SVN, expect it to be in the next release (however, if you already have npp installed, I dont think the installer will touch shortcuts.xml if it is already present).
Many thanks, Harry...
It's working fine now..