From fcd7919fdc04c701abfcb54f137b0df878b05d55 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 18 Aug 2011 18:35:40 +0500 Subject: [PATCH 1/2] add selected text to finds prompt --- lib/ace/commands/default_commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/commands/default_commands.js b/lib/ace/commands/default_commands.js index 7fbe610f..def3bc11 100644 --- a/lib/ace/commands/default_commands.js +++ b/lib/ace/commands/default_commands.js @@ -95,7 +95,7 @@ canon.addCommand({ name: "find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(env, args, request) { - var needle = prompt("Find:"); + var needle = prompt("Find:", env.editor.getCopyText()); env.editor.find(needle); } }); @@ -103,7 +103,7 @@ canon.addCommand({ name: "replace", bindKey: bindKey("Ctrl-R", "Command-Option-F"), exec: function(env, args, request) { - var needle = prompt("Find:"); + var needle = prompt("Find:", env.editor.getCopyText()); if (!needle) return; var replacement = prompt("Replacement:"); From e0406109954170938b401cc236af141107c610af Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 18 Aug 2011 18:48:58 +0500 Subject: [PATCH 2/2] fix invisible scrollbar for zoomed pages on firefox --- lib/ace/scrollbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ace/scrollbar.js b/lib/ace/scrollbar.js index 55a75b33..ad6c3b1a 100644 --- a/lib/ace/scrollbar.js +++ b/lib/ace/scrollbar.js @@ -54,8 +54,10 @@ var ScrollBar = function(parent) { // 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 // 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.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)); };