File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 104
104
}
105
105
});
106
106
107
- // Disable command conflicts with AltGr (see #5792)
108
- editor.commands.bindKey('Ctrl-alt-a|Ctrl-alt-e|Ctrl-alt-h|Ctrl-alt-l|Ctrl-alt-s', null)
109
-
110
- var updateTextarea = function() {
107
+ editor.getSession().on('change', function() {
111
108
ta.value = editor.getValue();
112
- };
109
+ }) ;
113
110
114
- editor.getSession().on('change', updateTextarea);
111
+ // Disable command conflicts with AltGr (see #5792)
112
+ editor.commands.bindKey('Ctrl-alt-a|Ctrl-alt-e|Ctrl-alt-h|Ctrl-alt-l|Ctrl-alt-s', null)
115
113
116
114
var updateHeight = function() {
117
115
var newHeight
118
116
= editor.getSession().getScreenLength()
119
117
* editor.renderer.lineHeight
118
+ - editor.renderer.$padding - 2
120
119
+ editor.renderer.scrollBar.getWidth();
121
- var setHeight = Math.max(newHeight, editor.container.getStyle('height'));
122
- editor.container.setStyle('height', setHeight.toString() + 'px');
120
+ var minHeight = editor.renderer.lineHeight - editor.renderer.$padding - 2;
121
+ if (newHeight < minHeight) newHeight = minHeight;
122
+ editor.container.setStyle('height', newHeight + 'px');
123
123
editor.resize();
124
124
};
125
125
You can’t perform that action at this time.
0 commit comments