Sublime Forum

Dev Build 3111

#4

My rendering issues on Windows have been fixed.

Good work.

1 Like

#5

Well, forget it.
I just went back in time (thanks TimeMachine) and re-upgraded (fingers crossed). That did it. Something corrupted somewhere certainly.


Pascal

0 Likes

#6

Minor rendering glitch on linux (ubuntu 14.04)

The tabs which are condensed have some text drawn on top of them. This started happening in build 3110. The text goes away if I move my mouse over it or if I switch tabs towards the left side. The text does not go away if I switch tabs towards the right side.

0 Likes

Tab bar rendering error (Build 3111)
#7

In syntax definition what is the expected behavior of with_prototype when pushing several contexts? Like in this one:

  - match: \bimport\b
    push: [import_statement_scope, import_statement, spaces]
    with_prototype:
    - match: (?=;)
      pop: true

Seems like currently it does nothing.

1 Like

#8

from my testing, it seems the prototype only applies to the top context, which in your case would be spaces.

example yaml proof:

%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
scope: source.example_push_multiple_prototype
contexts:
  main:
  - match: hello
    scope: keyword.operator.word
    push: [test1, test2]
    with_prototype:
    - match: (?=;)
      pop: true
  test1:
    - match: world
      scope: constant.numeric.integer
      pop: true
  test2:
    - match: foobar
      scope: string.unquoted
      pop: true

example “code” proof:

hello;foobarworld # foobar is not colored but world is. if the prototype was expected to pop all pushed contexts, it doesn't, it just pops the top one, like normal
hellofoobar;world # foobar is colored and so is world. if the prototype applied to all pushed contexts, world would not be colored
2 Likes

#9

New in 3111, the UI freezes (no repaints) if run from the command line with some files AND there is a project.

Seems to get stuck at indexing, possibly a thread related issue (deadlock, thread race, etc)?

0 Likes

#10

@wbond: Highlighting goes crazy around line 152: https://chromium.googlesource.com/chromium/src/+/master/extensions/renderer/dispatcher.h

0 Likes

#11

Looks good for me? Possibly fixed in the latest package patch.

0 Likes

#12

OK. Possibly. Referring to stock 3111 where most of this code becomes green.

0 Likes

#13

I did not see the error you described in the latest version of the syntax. I did, however, use that file to improve the C++ syntax a little more:

  • Detects some macro calls in class/struct/union bodies
  • Has better handling of the friend keyword
0 Likes

#14

@wbond This file is problematic with latest syntax from github: https://chromium.googlesource.com/chromium/src/+/master/extensions/browser/guest_view/web_view/web_view_renderer_state.cc

Stuff after:

WebViewRendererState::WebViewInfo::WebViewInfo(const WebViewInfo& other) =
    default;

is not scoped properly.

0 Likes

#15

The issue you reported has been fixed.

Just so I don’t miss any reports of issues with the default syntaxes, try to report them at https://github.com/sublimehq/Packages/issues.

0 Likes

#16

@wbond I still want some comments about with_prototype behavior (see above). Is it expected or it’s a defect?

0 Likes

#17

The current implementation only applies with_prototype to the last “target” of the push or set. I’ll try to confirm with Jon to ensure that is what he intended.

If you wanted to have it applied to all of the targets, I think there would be a little leg work (an extra context) for each but the last in the stack:

%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
scope: source.example_push_multiple_prototype
contexts:
  main:
  - match: hello
    scope: keyword.operator.word
    push: [test1-pop, test2]
    with_prototype:
    - match: (?=;)
      pop: true
  test1-pop:
    - match: ''
      set: test1
      with_prototype:
        - match: (?=;)
          pop: true
  test1:
    - match: world
      scope: constant.numeric.integer
      pop: true
  test2:
    - match: foobar
      scope: string.unquoted
      pop: true

In general I’ve found with_prototype to be of limited value since it is fairly trivial to introduce infinite recursion. Instead I’ve been tending to use explicit transitions using set and include to bounce from one context to another.

1 Like

#18

Thanks. Recursions can be a nuisance, tried them already. But every time I do a syntax it ends as an endless mess. Was hoping some autogeneration may help a little.

0 Likes

#19

@lastsecondsave out of interest, what language(s) are you building syntax definitions for? :slight_smile:

I too used to struggle quite a bit, and was cursing some of the limitations, but am getting better at it all the time and quite enjoying it now :slight_smile:

0 Likes

#20

@kingkeith The one that is endless mess is for Java, I’m trying to redo my old version from scratch. Shell and Powershell are next in the list.

0 Likes

#21

Ah, those are indeed tricky languages to scope! Have you checked out the work done on https://packagecontrol.io/packages/ShellScriptImproved? :slight_smile:

0 Likes

#22

No. I, for some reason, tend to make my own version of every syntax I use. I do agree, it’s a funny riddle to solve.

0 Likes

#23

Yes, Java and Shell are on my list to get cleaned up. Both are kind of a mess right now, but Shell has the most open issues.

Over the past few days I made some fixes to Java. If you know of any issues, please do post bugs at https://github.com/sublimehq/Packages/issues. Examples of broken syntax in any of the default packages are extremely helpful.

Generally, I’m breaking syntaxes down into smaller, more manageable named chunks, categorizing them into statements/expressions and then improving word boundaries, adding comments, improving matching of meta scopes, adding scopes to various punctuation, etc.

1 Like