Select word with subsequent space by doubleclick
Select word with subsequent space by doubleclick
In most text programs the subsequent space also is selected if a word is doubleclicked. Is there a solution for TRichViewEdit to imitate this behaviour?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It was made intentionally, because I think that copying a word is more useful than copying a word with following spaces.
Changing this behavior requires modifying TRichView source code.
Open CRVFData.pas, find the function TCustomRVFormattedData.FindWordAtR_, insert BEFORE the line:
the following code:
And add RVSELECTWORDINCLUDESPACE in the list of compiler defines for your project.
This change will be included in the next update.
Changing this behavior requires modifying TRichView source code.
Open CRVFData.pas, find the function TCustomRVFormattedData.FindWordAtR_, insert BEFORE the line:
Code: Select all
Word := RVU_Copy(Word, Offs, Len, ItemOptions);
Code: Select all
{$IFDEF RVSELECTWORDINCLUDESPACE}
while (Offs+Len-1<RVU_Length(Word,ItemOptions)) and
RVU_IsSpace(Word, Offs+Len, ItemOptions) do
inc(Len);
{$ENDIF}
This change will be included in the next update.
It depends on the context. Usually I agree if you have to do something with this word. But during writing it is more comfortable including the spcae char to move the word to another place in the text.Sergey Tkachenko wrote:It was made intentionally, because I think that copying a word is more useful than copying a word with following spaces.
Optimum would be to enable/disable this behavior via options. Will that be possible in the next version perhaps?
Thank you!
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: