dvdkruk / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

Bugs with automatic field number generation when pressing semicolon #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Kenton Varda:

The protobuf editor has a nifty feature where if you type a new field 
definition without a field number, a field number will automatically be 
inserted for you when you press semicolon.  Cool!

Unfortunately, there are a number of problems:

1) A space should be inserted before the '=' if one is not there already, 
otherwise I typically end up with this:
 optional int32 foo= 1;

2) Sometimes a field number is inserted even though a field number already 
exists on the line, so I end up with:
 optional int32 foo = 1= 2;
I can't figure out how to reliably reproduce this; it seems non-deterministic.

3) The behavior triggers no matter where the cursor is on the line, as long as 
no semicolon already exists on the line.  There are a few cases I've found 
where this is particularly annoying:
 a) In comments, when typing prose.
 b) In default value strings which happen to contain a semicolon.
 c) When typing single-line blocks, e.g.:
   message Foo { optional int32 bar = 1};
 (The semicolon here was supposed to go before the brace.)

Original issue reported on code.google.com by alr...@google.com on 25 Jul 2011 at 10:13

GoogleCodeExporter commented 9 years ago
r7c3dab8d2c2e

Original comment by alr...@google.com on 25 Jul 2011 at 10:17