User forums > Using Code::Blocks

Bad user experience of the replace dialog

<< < (2/2)

Jenna:

--- Quote from: ollydbg on November 23, 2009, 03:33:10 pm ---Thanks.
Is it possible to change the start position of the search. It seems this function control the start position.

sdk\editormanager.cpp  line 1287


--- Code: ---void EditorManager::CalculateFindReplaceStartEnd(cbStyledTextCtrl* control, cbFindReplaceData* data, bool replace)
--- End code ---

--- End quote ---

It's possible, but might be incorrect, what if you select text with pressed mouse-button from left to right ?
In this case it would be incorrect to set the cursor to the start of the selection (the user might have had a cause to do so).

How to decide when the current position has to be corrected and when not ?

The only place to change the default behaviour (of a doubleclick) is inside the scintilla-code (in my opinion).
[see Editor.cxx:5404  void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt)]

But to place the cursor at the beginning of a word after duble-clicking it would be quiet unusual as far as I know.

ollydbg:
Hi, jens, I think you misunderstand my idea.

I don't want to change the behavior when I double click on a string.

I just want to change the search(replace) start position, it seems we can change it in the function
 
void EditorManager::CalculateFindReplaceStartEnd,

And that don't affect the scintilla related behavior.

Jenna:

--- Quote from: ollydbg on November 23, 2009, 04:33:08 pm ---Hi, jens, I think you misunderstand my idea.

I don't want to change the behavior when I double click on a string.

I just want to change the search(replace) start position, it seems we can change it in the function
 
void EditorManager::CalculateFindReplaceStartEnd,

And that don't affect the scintilla related behavior.

--- End quote ---

No you misunderstood me.

Please read carefully what I wrote:


--- Quote from: jens on November 23, 2009, 04:11:26 pm ---It's possible, but might be incorrect, what if you select text with pressed mouse-button from left to right ?
In this case it would be incorrect to set the cursor to the start of the selection (the user might have had a cause to do so).

--- End quote ---
It's of course also incorrect to change the start position for a search (at least in this case), because as written: the user might have had a cause to do so.

--- Quote from: jens on November 23, 2009, 04:11:26 pm ---How to decide when the current position has to be corrected and when not ?

--- End quote ---

ollydbg:
Sorry, my English is not so good. :wink:
At least I can select the text by select text with pressed mouse-button from right to left, this time, the caret was before the text.

It's midnight now, I will reread this thread tomorrow. Thanks.

Navigation

[0] Message Index

[*] Previous page

Go to full version