fix search problem on different charset page than display charset
* proto.h (conv_search_string): added * search.c (migemostr): use conv_search_string (conv_search_string): added * main.c (srchcore): use conv_search_string (reMark): ditto * menu.c (menu_search_forward): ditto (menu_search_backward): ditto (menu_search_next_previous): ditto From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
16
search.c
16
search.c
@@ -1,4 +1,4 @@
|
||||
/* $Id: search.c,v 1.30 2003/09/22 21:02:21 ukai Exp $ */
|
||||
/* $Id: search.c,v 1.31 2004/03/23 16:44:02 ukai Exp $ */
|
||||
#include "fm.h"
|
||||
#include "regex.h"
|
||||
#include <signal.h>
|
||||
@@ -72,7 +72,7 @@ migemostr(char *str)
|
||||
Strchop(tmp);
|
||||
if (tmp->length == 0)
|
||||
goto err;
|
||||
return tmp->ptr;
|
||||
return conv_search_string(tmp->ptr, SystemCharset);
|
||||
err:
|
||||
/* XXX: backend migemo is not working? */
|
||||
init_migemo();
|
||||
@@ -81,6 +81,18 @@ migemostr(char *str)
|
||||
}
|
||||
#endif /* USE_MIGEMO */
|
||||
|
||||
#ifdef USE_M17N
|
||||
/* normalize search string */
|
||||
char *
|
||||
conv_search_string(char *str, wc_ces f_ces)
|
||||
{
|
||||
if (SearchConv && !WcOption.pre_conv &&
|
||||
Currentbuf->document_charset != f_ces)
|
||||
str = wtf_conv_fit(str, Currentbuf->document_charset);
|
||||
return str;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
forwardSearch(Buffer *buf, char *str)
|
||||
{
|
||||
|
Reference in New Issue
Block a user