Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve folding behavior #1085

Merged
merged 5 commits into from
Nov 7, 2012
Merged

improve folding behavior #1085

merged 5 commits into from
Nov 7, 2012

Conversation

nightwing
Copy link
Member

allows to toggle fold widget with double click on fold margin
and fixes comment folding for

// this line was being included in fold bellow
/*
*/

@ajaxorg/liskov

var row = e.getDocumentPosition().row;
var session = editor.session;
var fw = session.foldWidgets;
if (!fw || fw[row])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are missing ! for the expression to be if (!fw || !fw[row])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, if fw[row] is truthy there is a foldwidget on row, and click on it is already handled above

@mostafaeweda
Copy link
Contributor

@ajaxorg/liskov merged !

mostafaeweda pushed a commit that referenced this pull request Nov 7, 2012
@mostafaeweda mostafaeweda merged commit 2c86ab5 into master Nov 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants