Conversation
…iptor so that if the key is empty, it can check to if it's because the key was '-'. There are many ways to enable '-' as a keyboard shortcut, but this seemed by far the least intrusive.
…e to allow pre tags to inherit line-height (and hense, easier to change dynamically).
… pre tags. This is required to handle a CM/bootstrap integration issue, and is fixed in the most recent version of CM, so this can eventually be removed.
I noticed a bug with the in-line editor when changing font sizes so you might want to hold off on this. I have a partial fix, and I'll try to get the rest done tomorrow (15th). |
…w inline editors resize exactly as their containing editors do.
Now inline editors resize exactly as their containing editors do. This request is ready for review. |
@@ -21,7 +21,7 @@ | |||
* | |||
*/ | |||
|
|||
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ | |||
/*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, indent: 4, maxerr: 50 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we prefer to explicitly call out 'window' instead of 'browser'
Assigning to me |
console.log("KeyMap _buildKeyDescriptor() - No key provided!"); | ||
return ""; | ||
if (origDescriptor && origDescriptor.search(/^.+--$/) !== -1) { // Check if the binding is for "-" | ||
key = "-"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this logic would be better in _normalizeKeyDescriptorString()
, since that's actually where the logical loophole is that causes the problem--i.e., it should be treated as a workaround for the fact that we're splitting on "-", and we should explicitly test for the case there.
Initial review finished. |
…criptor to _normalizeKeyDescriptorString.
…the Editor itself.
- Added validation to make sure we're only operating on fonts specified as px or em. - Made the minimum font size check more robust. - Changed the arguments to _adjustFontSize from "up" and "down" to 1 and -1. - Replaced document.createElement with some jQuery magic. - Moved some editor refresh logic into a function inside Editor itself.
Thanks, NJ. All requested changes have been made. |
Looks good, merging. |
Added the ability to increase and decrease the font size of the editor using Ctrl -/+. The change should be persistent across all editors, but not persistent across sessions.
Note that the change to brackets_codemirror_override.less is only temporary and can be removed once we either update CodeMirror2, or once we merge codemirror.css separately.