Open math2001 opened 4 months ago
It probably shouldn't in text
scope, but in source
it might be possible the parentheses defining a function argument list, which most likely is not separated with space from function name.
void
func_name
(int arg1, int arg2)
{ return arg1 + arg2; }
is most likely expected to become
void func_name(int arg1, int arg2) { return arg1 + arg2; }
Space in front of {
should however be preserved, ideally.
So whether whitespace should be removed or not may not be simple to answer.
is alt+Q meant to be used on source code though?
Sure.
related report: https://forum.sublimetext.com/t/inhibit-removing-spaces-before-parentheses-when-wrapping-comments/73233
I have to set ruler to 78 instead of 80 with ST4180, but I can reproduce it. Space in front of column is removed, even though the whole line is not wrapped.
That kind of behavior is certainly a bug.
Before:
// The instruction buffer is a shift register with three 16-bit entries:
//
// * 2x 16-bit entries form the 32-bit current instruction register (CIR) which
// is the processor's decode window
//
After
// The instruction buffer is a shift register with three 16-bit entries:
//
// * 2x 16-bit entries form the 32-bit current instruction register(CIR) which
// is the processor's decode window
//
Description of the bug
alt+q
wrap_lines
removes spaces before(
,{
and[
, but I don't think it should. Personally, I always want to keep the space.Steps to reproduce
ctrl+n
, open the console and pasteThen paste in the buffer
And press alt+q for each paragraph.
Expected behavior
Actual behavior
Sublime Text build number
4169
Operating system & version
Ubuntu 22.04
(Linux) Desktop environment and/or window manager
Gnome
Additional information
No response
OpenGL context information
No response