Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: frithjofh on September 16, 2016, 09:25:11 pm
-
hi everybody,
I made a small patch to make the status bar of the main window show the current caret position besides the line number and column number.
patch file and screen shot attached.
regards
-
What is the purpose of this position?
-
it helps when writing code for searching tokens or parsing text. often such code uses indices into the text to identify starting points and ending points of tokens. having the caret position shown on status bar helps a lot when tracking and assuring the correct behaviour of such parsing code
-
it helps when writing code for searching tokens or parsing text. often such code uses indices into the text to identify starting points and ending points of tokens. having the caret position shown on status bar helps a lot when tracking and assuring the correct behaviour of such parsing code
For example, when developing CodeCompletion plugin, I often need the such position value. Maybe other plugin devs need this feature too.
But for a normal C::B user, does he need that feature?
-
i would not know... but the feature is very unobtrusive, and line number and column number are already there, equally useful or not to normal users
-
OK, and I have no objection about this change. :)
-
it helps when writing code for searching tokens or parsing text. often such code uses indices into the text to identify starting points and ending points of tokens. having the caret position shown on status bar helps a lot when tracking and assuring the correct behaviour of such parsing code
But for a normal C::B user, does he need that feature?
Speaking as a normal user, not at all; but it isn't a hinder, either. So my opinion would be neutral.
-
hello. as far as i can see, this patch hasn't been applied nor discarded... is it going to make into the codebase?
-
I've probably forgotten to apply it.
-
In svn, thanks for the contribution.
-
weird enough... a byte position usually used with binary files is useful enough for a C/C++ IDE, but a string (selection) length (http://forums.codeblocks.org/index.php/topic,12886.msg91952.html) isn't even though it's hard to develop in C/C++ without it... (in a meaningful way without relying on strcpy(), std:: etc.)
-
I don't understand your comment. Can you clarify what do you mean with it?
If you ask me I'd never use this position, so I can't comment on the usefulness of the feature.
There was a patch, the author reminded me, I've looked at it and I've committed it.
Your patch has not been rejected, so if you've reminded us we could have applied it first.
Now if your patch differs to the one applied in behaviour you'll need to provide a configuration option or negotiate with the patch author that your behaviour is better and provide a patch to change the behaviour.
-
no.. my patch added a different kind of thing... yet it's now a merge conflict of course..
If there is a "configuration" option to add.. it would have to be a customizable as in a custom format string to be applied.. Which also means to have a meaningful default.
Also, I didn't try to neglect the use of a binary position, it's just that I wouldn't assume to edit binary files through an IDE... (and yes, those could be text files as well as with the CC example)
What might work as well, is different presets for the status bar row... like cycling through possible "sets" by clicking them...
-
I don't think a custom format string is needed or worth it. Just make the most obvious combinations.
I'm not sure what is better - adding a button like the highlight language button or just adding a configuration option in the settings.
The buttons in the status bar are looking pretty bad when using wx3.x on linux (not sure what is the behaviour on windows). I'll have to investigate this anyway...
-
Hello,
I find that with this change, the place to see the full path of the current file is reduced.
It seems to me more useful to see the path of the file used this change (See attached image)
-
What is the DPI of your monitor?
For you every block looks bigger than necessary!
-
Thank you for your reply.
Monitor ASUS VK221D, 21 inches (18.5x11.5 inch), 1440x900 pixels
width = 77.8 dpi, height = 78.2 dpi
The previous image using a font size of 120 ppp
The attached image uses a font size of 96 ppp, but this size is not easy to read !
-
it doesn’t seem to have very much to do with the change to the field on the status bar. the width of the field didn't change that much... most of the needed space for the new information i took from the already present text making it shorter. the effect shown in your screen shot is not the image i see on my machine. why are all of the fields so long on your machine? there is something else wrong here...
-
Thank you.
I use 'svn11112'.
Could you make a picture showing all of your status bar?
-
sure :)
-
Your monitor width is about 1900 pixels, is 460 pixels more than my monitor : which is why you have a large space for file paths.
-
i am aware of that. but i do think that the fields on your machine are wider than on mine... could be mistaken though ::)
-
well.. on my machine (Win10) it looks quite the same as in the second screenshot. (here (http://"http://forums.codeblocks.org/index.php/topic,21439.msg149959.html#msg149959"))
just that my "Line, Col, Pos" is bigger.