News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

show debugger tip under curser when ctrl key is pressed

Started by ollydbg, December 17, 2010, 07:53:40 AM

Previous topic - Next topic

Loaden

Quote from: ollydbg on December 20, 2010, 05:26:50 AM

Index: plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- plugins/debuggergdb/debuggergdb.cpp (revision 6903)
+++ plugins/debuggergdb/debuggergdb.cpp (working copy)
@@ -2648,6 +2648,11 @@
    if (!Manager::Get()->GetConfigManager(_T("debugger"))->ReadBool(_T("eval_tooltip"), false))
        return;

+    if (!::wxGetKeyState(WXK_CONTROL))  // does not work!!!!!
+        return;
+    //if(! (::GetAsyncKeyState(VK_CONTROL)&0x80))
+    //    return;
+
    EditorBase* base = event.GetEditor();
    cbEditor* ed = base && base->IsBuiltinEditor() ? static_cast<cbEditor*>(base) : 0;
    if (!ed)
Index: sdk/wxscintilla/src/scintilla/src/Editor.cxx
===================================================================
--- sdk/wxscintilla/src/scintilla/src/Editor.cxx (revision 6903)
+++ sdk/wxscintilla/src/scintilla/src/Editor.cxx (working copy)
@@ -5379,7 +5379,10 @@
}

int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) {
- DwellEnd(false);
+
+ if (!ctrl)
+    DwellEnd(false);
+
int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
       (alt ? SCI_ALT : 0);
int msg = kmap.Find(key, modifiers);



This patch try to solve the problem, but it failed. when holding the ctrl, the tip show about 0.1 second and disappeared quickly.

any one can help me? thanks.
Good catch!

oBFusCATed

A fix for this was committed in r7397 in the debugger's branch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

Quote from: oBFusCATed on August 29, 2011, 04:55:21 PM
A fix for this was committed in r7397 in the debugger's branch.
would you like to do some extra enhancement? like the patch here:
hit the ctrl key to show the debug tip
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

Yes, my version of this patch is to be committed in some time...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

Quote from: oBFusCATed on August 30, 2011, 09:08:18 AM
Yes, my version of this patch is to be committed in some time...
No, the rev 7397 only change one file.
But What I said is to use the full patch:
http://smrt.is-a-geek.org/codeblocks/patches/dbg/dbg_refactor0022.5.patch
Such that when you hit the ctrl, the emulated dwell event is sent.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

Quote from: oBFusCATed on August 30, 2011, 09:08:18 AM
Yes, my version of this patch is to be committed in some time...
The text in bold probably should have been: "is going to be"
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]