User forums > Nightly builds
The 17 September 2011 build (7452) is out.
Jenna:
--- Quote from: daniloz on September 23, 2011, 11:26:11 am ---Agreed, focus the editor and function in the middle of the view would be cool! 8)
--- End quote ---
Why in the middle, and not at the top ?
If we want to see the body of the function, this would be the natural position.
Micool121:
yes, please return back to the editor and function focus (like done before)
Any place of the function between middle and top will make me pleased !
daniloz:
--- Quote from: jens on September 23, 2011, 01:23:17 pm ---
--- Quote from: daniloz on September 23, 2011, 11:26:11 am ---Agreed, focus the editor and function in the middle of the view would be cool! 8)
--- End quote ---
Why in the middle, and not at the top ?
If we want to see the body of the function, this would be the natural position.
--- End quote ---
Top is fine with me as well, but sometimes it's good to see some context, so middle make sense for me...
ollydbg:
In cbEditor.h, see a function prototype:
--- Code: --- /** Move the caret at the specified line.
* @param line Line to move caret to.
* @param centerOnScreen If true (default), tries to bring the specified line to the centre of the editor.*/
void GotoLine(int line, bool centerOnScreen = true);
--- End code ---
So, it should be quite easy to implement this feature.
About the other feature, put the focus on the editor window, probably it is easy too.
ollydbg:
A simple patch to implement both features:
--- Code: ---Index: E:/code/cb/cb_trunk/src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- E:/code/cb/cb_trunk/src/plugins/codecompletion/codecompletion.cpp (revision 7460)
+++ E:/code/cb/cb_trunk/src/plugins/codecompletion/codecompletion.cpp (working copy)
@@ -416,7 +416,9 @@
if (line > control->GetLineCount())
return false;
- control->GotoLine(line);
+ //control->GotoLine(line);
+ editor->GotoLine(line,true);
+ editor->SetFocus();
const int startPos = control->GetCurrentPos();
const int endPos = startPos + control->LineLength(line);
if (endPos <= startPos)
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version