commit
1b84360aed
2 changed files with 5 additions and 3 deletions
|
|
@ -95,7 +95,7 @@ canon.addCommand({
|
||||||
name: "find",
|
name: "find",
|
||||||
bindKey: bindKey("Ctrl-F", "Command-F"),
|
bindKey: bindKey("Ctrl-F", "Command-F"),
|
||||||
exec: function(env, args, request) {
|
exec: function(env, args, request) {
|
||||||
var needle = prompt("Find:");
|
var needle = prompt("Find:", env.editor.getCopyText());
|
||||||
env.editor.find(needle);
|
env.editor.find(needle);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -103,7 +103,7 @@ canon.addCommand({
|
||||||
name: "replace",
|
name: "replace",
|
||||||
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
|
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
|
||||||
exec: function(env, args, request) {
|
exec: function(env, args, request) {
|
||||||
var needle = prompt("Find:");
|
var needle = prompt("Find:", env.editor.getCopyText());
|
||||||
if (!needle)
|
if (!needle)
|
||||||
return;
|
return;
|
||||||
var replacement = prompt("Replacement:");
|
var replacement = prompt("Replacement:");
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,10 @@ var ScrollBar = function(parent) {
|
||||||
// in OSX lion the scrollbars appear to have no width. In this case resize
|
// in OSX lion the scrollbars appear to have no width. In this case resize
|
||||||
// the to show the scrollbar but still pretend that the scrollbar has a width
|
// the to show the scrollbar but still pretend that the scrollbar has a width
|
||||||
// of 0px
|
// of 0px
|
||||||
|
// in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
|
||||||
|
// make element a little bit wider to retain scrollbar when page is zoomed
|
||||||
this.width = dom.scrollbarWidth();
|
this.width = dom.scrollbarWidth();
|
||||||
this.element.style.width = (this.width || 15) + "px";
|
this.element.style.width = (this.width || 15) + 5 + "px";
|
||||||
|
|
||||||
event.addListener(this.element, "scroll", this.onScroll.bind(this));
|
event.addListener(this.element, "scroll", this.onScroll.bind(this));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue