sf-web / sf-web.github.io

Source Foundry - sourcefoundry.org website
http://sourcefoundry.org
8 stars 3 forks source link

Playground: #9

Open justin-parus opened 8 years ago

justin-parus commented 8 years ago

When you run the cursor accross a parenthesis or bracket it highlights/circles the matching character but does not remove the highlighting when the cursor is not near the original character anymore.

chrissimpkins commented 8 years ago

cc: @jublo

Can you provide a bit more detail on your problem and the browser/OS that you are using Justin? I am not following what you mean here.

justin-parus commented 8 years ago

Ubuntu 14.04. with chromium

Lets say you have code

foo(int x) {
   // code
}

When I put my cursor on the lower curly brace, the playground circles/highlights the first brace as its "matching" brace. When you move the cursor off the lower bracket to the code section: the first brace that was circled/highlighted as "matching" stays circled/highlighted.

Seems to be an issue with the ACE Editor; however, on the ACE Editor page the "matching brace highlighting" functionality works fine.

chrissimpkins commented 8 years ago

Ah, I see. Yes, that is not something that we implemented. Let me check on the ACE editor version here to confirm that we are current.

chrissimpkins commented 8 years ago

cc: @jublo @jublonet

JM, do you happen to have any thoughts?

chrissimpkins commented 8 years ago

Here is the changelog for the delta on the current version of ACE vs the one that we are using:

2016.01.17 Version 1.2.3

* Bugfixes
  - fix memory leak in setSession (Tyler Stalder)
  - double click not working on linux/mac

* new language modes
  - reStructuredText (Robin Jarry)
  - NSIS (Jan T. Sott)

Don't know whether it will fix this but I will update to the current ACE script so that you can give it a try.

chrissimpkins commented 8 years ago

Doesn't seem to help, I am still seeing the same behavior with v1.2.3 of the ACE editor:

Submitted an issue report on the ACE repository if you'd like to follow there https://github.com/ajaxorg/ace/issues/2918

justin-parus commented 8 years ago

Yea, worth a shot. Definitely interesting as on the ACE website the issue does not occur. I will check it out, thanks!

chrissimpkins commented 8 years ago

Interesting, maybe something in our implementation of the editor then. Poke, poke @jublo :wink:

@davidvangemeren : David, have any thoughts?

burodepeper commented 8 years ago

I've looked/glanced at the code, and apart from an inline reference to an older version of ace (ace.config.set("basePath","https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.0");, which might load as a fallback?) I don't see anything that directly influences what happens in the editor.

chrissimpkins commented 8 years ago

Thank you David @burodepeper!

burodepeper commented 8 years ago

@justin-parus We'll (actually, Chris will) look if there's an option to disable the brace-matching for now. It seems to be an issue with a shared session between editors.

mynetx commented 8 years ago

@chrissimpkins Apparently this is hard-coded to "on" right now in Ace. http://stackoverflow.com/a/31825820/486298

chrissimpkins commented 8 years ago

@jublo thank you very much JM! Can we simply use the linked script and import it after the ace.js import from cdnjs? Is it that simple?

mynetx commented 8 years ago

@chrissimpkins I haven’t tested it, but it might work. Worth trying anyways! :)

chrissimpkins commented 8 years ago

@jublo thanks!

mynetx commented 7 years ago

@chrissimpkins Is this done/implemented?

chrissimpkins commented 7 years ago

Don't believe so @jublo