Compare commits

...

4 Commits

Author SHA1 Message Date
Junegunn Choi
b3010a4624 0.10.8 2015-10-09 12:42:07 +09:00
Junegunn Choi
7d53051ec8 Merge pull request #371 from wilywampa/edit_directory
Trigger netrw autocommand when opening directory
2015-10-09 12:36:08 +09:00
Jacob Niehus
ed893c5f47 Trigger netrw autocommand when opening directory 2015-10-08 20:28:07 -07:00
Junegunn Choi
a4eb3323da Fix #370 - Panic when trying to set colors when colors are disabled 2015-10-09 12:16:47 +09:00
7 changed files with 30 additions and 7 deletions

View File

@@ -1,6 +1,11 @@
CHANGELOG
=========
0.10.8
------
- Fixed panic when trying to set colors after colors are disabled (#370)
0.10.7
------

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
[[ "$@" =~ --pre ]] && version=0.10.7 pre=1 ||
version=0.10.7 pre=0
[[ "$@" =~ --pre ]] && version=0.10.8 pre=1 ||
version=0.10.8 pre=0
cd $(dirname $BASH_SOURCE)
fzf_base=$(pwd)

View File

@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
..
.TH fzf 1 "Oct 2015" "fzf 0.10.7" "fzf - a command-line fuzzy finder"
.TH fzf 1 "Oct 2015" "fzf 0.10.8" "fzf - a command-line fuzzy finder"
.SH NAME
fzf - a command-line fuzzy finder

View File

@@ -416,6 +416,9 @@ function! s:cmd_callback(lines) abort
set noautochdir
for item in a:lines
execute cmd s:escape(item)
if exists('#BufEnter') && isdirectory(item)
doautocmd BufEnter
endif
endfor
finally
let &autochdir = autochdir

View File

@@ -8,7 +8,7 @@ import (
const (
// Current version
version = "0.10.7"
version = "0.10.8"
// Core
coordinatorDelayMax time.Duration = 100 * time.Millisecond

View File

@@ -380,8 +380,11 @@ func parseTiebreak(str string) tiebreak {
}
func dupeTheme(theme *curses.ColorTheme) *curses.ColorTheme {
dupe := *theme
return &dupe
if theme != nil {
dupe := *theme
return &dupe
}
return nil
}
func parseTheme(defaultTheme *curses.ColorTheme, str string) *curses.ColorTheme {
@@ -402,7 +405,7 @@ func parseTheme(defaultTheme *curses.ColorTheme, str string) *curses.ColorTheme
}
// Color is disabled
if theme == nil {
errorExit("colors disabled; cannot customize colors")
continue
}
pair := strings.Split(str, ":")

View File

@@ -316,3 +316,15 @@ func TestColorSpec(t *testing.T) {
t.Errorf("using default colors")
}
}
func TestParseNilTheme(t *testing.T) {
var theme *curses.ColorTheme
newTheme := parseTheme(theme, "prompt:12")
if newTheme != nil {
t.Errorf("color is disabled. keep it that way.")
}
newTheme = parseTheme(theme, "prompt:12,dark,prompt:13")
if newTheme.Prompt != 13 {
t.Errorf("color should now be enabled and customized")
}
}