Re: [PATCH] Add help.autocorrect to enable/disable autocorrecting
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 23, 2008, 19:04 UTC
- Message-ID
- <alpine.DEB.1.00.0807232003420.8986@racer>
- In-Reply-To
- <alpine.DEB.1.00.0807231958210.8986@racer>
Hi,
On Wed, 23 Jul 2008, Johannes Schindelin wrote:
Show 14 quoted lines
> On Wed, 23 Jul 2008, Alex Riesen wrote: > > > Johannes Schindelin, Wed, Jul 23, 2008 18:44:49 +0200: > > > > + n = 1; > > > > + while (n < main_cmds.cnt && > > > > + best_similarity == similarity(main_cmds.names[n]->name)) > > > > + ++n; > > > > > > Mini-nit: you never ask for the value of n, only if it is 1 or larger. So > > > you do not need to count... > > > > But I do, don't I? AFAICS, I use 0, 1 and >1 (this-these). > > Yes. So check cnt > 0 && best_similarity > 5 says if it is 0,
Oh, I just realized that my patch is bogus anyway. It only checks for best_similarity > 5 in the case that the first two commands have equal similarity. D'oh.
Ciao, Dscho