trichview.com

trichview.support




Re: possible bug, Search/Replace question


Return to index


Author

Message

Vladimir Ota

Posted: 04/30/2002 12:43:33


>Ctrl+V and Shift+Insert execute the same code and results should be the same.

May be you have some action or menu item with one of these shortcuts that

overrides default behavior?

>


Menu shortcut was indeed the reason for different behavior of Ctrl+V and

Shift+Insert.


But I still believe that if:

a) I define RichViewEdit.Options:=[rvoAutoCopyText];

b) In OnPaste event handler I have DoDefault := True;

that the text should be pasted as the text and not as RTF or RVF when using

the Ctrl+V and Shift+Insert (This is the way I understand the help for Paste

procedure, but I could be wrong, of course).


>I do not understand what do you want to achieve. Returning to the original

position after executing Replace All command or something different?

>

Just an example - in sentence:

"quick brown fox jumps over the lazy dog's back" I have caret at beginning

of 'lazy'. If I now do search/replace of word 'brown' with 'red', my caret

is just before letter 'z' of 'lazy' (i.e. caret is at the same byte offset

from beginning of sentence, but it is not at same position of the text).

I cant figure out does the RichView offers an way to 'anchor' the caret to

the text (bookmark, jumppoint ..)?


Excuse me, please for awkward explanation before, but to express oneself

in non native language can be the bitch .. Hope this time around it is better

.


Regards, Vladimir


"Sergey Tkachenko" <[email protected]> wrote:

>> 1) possible bug?

>> I have encountered something what may (or may not ?) be bug in RichView.

>>

>> With the RichViewEdit Options: rvoAutoCopyUnicodeText, rvoAutoCopyRVF,

>rvoAutoCopyRTF

>> set to false and rvoAutoCopyText set to true the RichViewEdit's method

>Paste

>> and typing the Ctrl+V works as expected, i.e. it inserts the text from

>clipboard

>> at position of caret with TextStyle of text at that position. However,

>typing

>> Shift+Insert will cause the clipboard text to be inserted at the caret

>position

>> with TextStyle from where the text was copied/cut into clipboard.

>> I see no way around it. Is it possible to disable Shift+Insert key

>combination

>> altogether?

>

>>

>> 2) When I do search&replace in entire text (i.e. not from the caret

>position

>> forward) I don't know how can properly position the caret, so it shows

to

>> the same point of the text. Remembering the caret position and restoring

>> (of course) does not work if there was replacement in the same text item

>> before its position. I assume that setting 'bookmark' at caret position

>and

>> later jumping to it would do the trick. Unfortunately in looking in the

>help

>> files does not show me such (or similar) mechanism (or I don't look at

the

>> right places).

>> Any suggestions?

>

>

>

>





Powered by ABC Amber Outlook Express Converter