From 1e9e1886a275cfeb34eeaa39ca09f6f6c05a8e13 Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Wed, 22 Apr 2015 19:16:16 +0900 Subject: [PATCH] Correct misspellings in documents --- README.md | 4 ++-- action.go | 6 +++--- buffer.go | 3 +-- cli.go | 2 +- ctx.go | 2 +- hub.go | 4 ++-- layout.go | 2 +- line.go | 4 ++-- screen.go | 2 +- 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 004b4f7..644e645 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ Specifies the initial line position upon start up. E.g. If you want to start out ### --initial-filter `IgnoreCase|CaseSensitive|SmartCase|Regexp` -Specifies the initial fitler to use upon start up. You should specify the name of the filter like `IgnoreCase`, `CaseSensitive`, `SmartCase` and `Regexp`. Default is `IgnoreCase`. +Specifies the initial filter to use upon start up. You should specify the name of the filter like `IgnoreCase`, `CaseSensitive`, `SmartCase` and `Regexp`. Default is `IgnoreCase`. ### --prompt @@ -461,7 +461,7 @@ By default `peco` comes with `IgnoreCase`, `CaseSensitive`, `SmartCase` and `Reg The filter will be executed via `Command.Run()` as an external process, and it will be passed the query values in the command line, and the original unaltered buffer is passed via `os.Stdin`. Your filter must perform the matching, and print out to `os.Stdout` matched lines. You filter MAY be called multiple times if the buffer given to peco is big enough. See `BufferThreshold` below. -Note that currently there is no way for the custom filter to specify where in the line the match occurred, so matched portions in the string WILL NOT BE HIGHLITED. +Note that currently there is no way for the custom filter to specify where in the line the match occurred, so matched portions in the string WILL NOT BE HIGHLIGHTED. The filter does not need to be a go program. It can be a perl/ruby/python/bash script, or anything else that is executable. diff --git a/action.go b/action.go index bcc7535..4caea8c 100644 --- a/action.go +++ b/action.go @@ -10,7 +10,7 @@ import ( "github.com/peco/peco/keyseq" ) -// ErrUserCanceled is used to ignal that the user deliverately +// ErrUserCanceled is used to signal that the user deliberately // canceled using peco var ErrUserCanceled = errors.New("canceled") @@ -38,7 +38,7 @@ func (a ActionFunc) Execute(i *Input, e termbox.Event) { a(i, e) } -// Register fulfills the Actin interface for AfterFunc. Registers `a` +// Register fulfills the Action interface for AfterFunc. Registers `a` // into the global action registry by the name `name`, and maps to // default keys via `defaultKeys` func (a ActionFunc) Register(name string, defaultKeys ...termbox.Key) { @@ -48,7 +48,7 @@ func (a ActionFunc) Register(name string, defaultKeys ...termbox.Key) { } } -// RegisterKeySequence satisfies the Action interface for AfterFun. +// RegisterKeySequence satisfies the Action interface for AfterFunc. // Registers the action to be mapped against a key sequence func (a ActionFunc) RegisterKeySequence(k keyseq.KeyList) { defaultKeyBinding[k.String()] = a diff --git a/buffer.go b/buffer.go index cbda644..1ef6970 100644 --- a/buffer.go +++ b/buffer.go @@ -116,7 +116,7 @@ type RawLineBuffer struct { simplePipeline buffers dependentBuffers lines []Line - capacity int // max numer of lines. 0 means unlimited + capacity int // max number of lines. 0 means unlimited onEnd func() } @@ -289,4 +289,3 @@ func (flb *FilteredLineBuffer) Register(lb LineBuffer) { func (flb *FilteredLineBuffer) Unregister(lb LineBuffer) { flb.buffers.Unregister(lb) } - diff --git a/cli.go b/cli.go index 77462e0..1d259d9 100644 --- a/cli.go +++ b/cli.go @@ -59,7 +59,7 @@ func (o CLIOptions) BufferSize() int { return o.OptBufferSize } -// EnableNullSep returns tru if --null was specified. Fulfills CtxOptions +// EnableNullSep returns true if --null was specified. Fulfills CtxOptions func (o CLIOptions) EnableNullSep() bool { return o.OptEnableNullSep } diff --git a/ctx.go b/ctx.go index b330903..1f58b13 100644 --- a/ctx.go +++ b/ctx.go @@ -106,7 +106,7 @@ func (q *FilterQuery) InsertQueryAt(ch rune, where int) { } // Ctx contains all the important data. while you can easily access -// data in this struct from anwyehre, only do so via channels +// data in this struct from anywhere, only do so via channels type Ctx struct { *Hub *FilterQuery diff --git a/hub.go b/hub.go index bdd19d9..c446327 100644 --- a/hub.go +++ b/hub.go @@ -18,7 +18,7 @@ type Hub struct { pagingCh chan HubReq } -// HubReq is a wrapper around the actual requst value that needs +// HubReq is a wrapper around the actual request value that needs // to be passed. It contains an optional channel field which can // be filled to force synchronous communication between the // sender and receiver @@ -157,7 +157,7 @@ func (h *Hub) SendPaging(x PagingRequest) { send(h.PagingCh(), HubReq{x, nil}, h.isSync) } -// Stop closes the LoopCh so that peco shutsdown +// Stop closes the LoopCh so that peco shutdown func (h *Hub) Stop() { close(h.LoopCh()) } diff --git a/layout.go b/layout.go index 4325a70..3fcb691 100644 --- a/layout.go +++ b/layout.go @@ -512,7 +512,7 @@ func NewBottomUpLayout(ctx *Ctx) *BasicLayout { // The prompt is at the bottom, above the status bar prompt: NewUserPrompt(ctx, AnchorBottom, 1+extraOffset), // The list area is at the bottom, above the prompt - // IT's displayed in bottom-to-top order + // It's displayed in bottom-to-top order list: NewListArea(ctx, AnchorBottom, 2+extraOffset, false), } } diff --git a/line.go b/line.go index 26356f9..7cba3ea 100644 --- a/line.go +++ b/line.go @@ -56,12 +56,12 @@ type Line interface { // Indices return the matched portion(s) of a string after filtering. // Note that while Indices may return nil, that just means that there are - // no substrings to be hilighted. It doesn't mean there were no matches + // no substrings to be highlighted. It doesn't mean there were no matches Indices() [][]int // Output returns the string to be display as peco finishes up doing its // thing. This means if you have null separator, the contents before the - // separater are not included in this string + // separator are not included in this string Output() string // IsDirty returns true if this line should be forcefully redrawn diff --git a/screen.go b/screen.go index 576dbc8..9a02988 100644 --- a/screen.go +++ b/screen.go @@ -2,7 +2,7 @@ package peco import "github.com/nsf/termbox-go" -// Screen hides termbox from tne consuming code so that +// Screen hides termbox from the consuming code so that // it can be swapped out for testing type Screen interface { Flush() error