mirror of
https://github.com/junegunn/fzf.git
synced 2025-07-31 04:02:01 -07:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b3010a4624 | ||
|
7d53051ec8 | ||
|
ed893c5f47 | ||
|
a4eb3323da |
@@ -1,6 +1,11 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
0.10.8
|
||||
------
|
||||
|
||||
- Fixed panic when trying to set colors after colors are disabled (#370)
|
||||
|
||||
0.10.7
|
||||
------
|
||||
|
||||
|
4
install
4
install
@@ -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)
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
const (
|
||||
// Current version
|
||||
version = "0.10.7"
|
||||
version = "0.10.8"
|
||||
|
||||
// Core
|
||||
coordinatorDelayMax time.Duration = 100 * time.Millisecond
|
||||
|
@@ -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, ":")
|
||||
|
@@ -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")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user