User forums > Using Code::Blocks
Length of selected text
oBFusCATed:
Yes, it is getting too long and it doesn't convey that it is length.
After the previous change in this area there was a discussion to make this thing configurable with some kind of a formatting string.
zdena:
@BlueHazzard: It was whole morning fight. I lost the battle with automatic patching :( , but I solved it manually :) . Next the C::B sources compiling was hard - especially battle with libexchndl.
But the result: Yes, your solution works pretty good ;) Thank you
BlueHazzard:
To come back to this. The easiest way to make it configirable would be to expose a printf formatter string and give the user the information that
--- Code: ---%1$03d
--- End code ---
is the current line
--- Code: ---%2$03d
--- End code ---
is the current column
--- Code: ---%3$03d
--- End code ---
is the current selection
so he can write
--- Code: --- Line: %1$03d Col:%2$03d Sel:%3$03d
--- End code ---
or
--- Code: --- Sel: %3$03d | Line:%1$3d
--- End code ---
or whatever by himself... Of course here he has some way to screw up, probably some sanity checking can be introduced, but i think this is the fastest and most flexible way.
A other possibility would be to give him some macros like
--- Code: --- Sel: {sel} | Line:{line}
--- End code ---
where {sel} and {line} would be replaced by the actual numbers, but here he can not say how many numbers he wants ecc...
Anyway this should not be to hard to implement...
Open for suggestions.
oBFusCATed:
I'd prefer the second option. The first one is to unreadable.
zdena:
May I have a probably stupid question?
Where the user (will) can write the formatters or the macros?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version