diff options
author | 2012-10-22 12:49:29 -0400 | |
---|---|---|
committer | 2012-10-22 12:49:29 -0400 | |
commit | 83acfd9b74600610bab990b6450a7d049c41a74c (patch) | |
tree | d656443a828225b9ce515b2322237bb3a8e43ed0 | |
parent | 099a759c90841acf76c5bbb3610d01fef993d899 (diff) |
Fix string collation bug in ncurses due to CDK.
CDK would reset locale settings so autocomplete lists would not sort correctly.
-rw-r--r-- | core/init.lua | 1 | ||||
-rw-r--r-- | doc/12_Compiling.md | 26 | ||||
-rw-r--r-- | src/textadept.c | 2 |
3 files changed, 15 insertions, 14 deletions
diff --git a/core/init.lua b/core/init.lua index fe1a6e05..a0da9f94 100644 --- a/core/init.lua +++ b/core/init.lua @@ -3,7 +3,6 @@ _RELEASE = "Textadept 6.0 beta 3" package.path = _HOME..'/core/?.lua;'..package.path -os.setlocale('C', 'collate') if jit then require 'compat' end -- compatibility for LuaJIT _SCINTILLA = require 'iface' diff --git a/doc/12_Compiling.md b/doc/12_Compiling.md index b134c411..3af63124 100644 --- a/doc/12_Compiling.md +++ b/doc/12_Compiling.md @@ -156,17 +156,19 @@ non-Lua, libraries. ### Notes on CDK [CDK][] is a library of ncurses widgets. The terminal version of Textadept -includes a stripped down version of this library. The following source files -were removed from CDK: `alphalist.c`, `calendar.c`, `cdk_compat.{c,h}`, -`cdk_test.h`, `dialog.c`, `{d,f}scale.{c,h}`, `fslider.{c,h}`, -`gen-{scale,slider}.{c,h}`, `get_index.c`, `get_string.c`, `graph.c`, -`histogram.c`, `marquee.c`, `matrix.c`, `popup_dialog.c`, `radio.c`, -`scale.{c,h}`, `selection.c`, `slider.{c,h}`, `swindow.c`, `template.c`, -`u{scale,slider}.{c,h}`, `view_{file,info}.c`, and `viewer.c`. - -`cdk.h` has been modified to not `#include` "matrix.h", "viewer.h", and any -headers labeled "Generated headers" due to their machine-dependence. - -Also, the `deleteFileCB` routine in `fselect.c` has been deactivated. +includes a slightly modified, stripped down version of this library. The changes +made to CDK are as follows: + +* The following source files were removed: `alphalist.c`, `calendar.c`, + `cdk_compat.{c,h}`, `cdk_test.h`, `dialog.c`, `{d,f}scale.{c,h}`, + `fslider.{c,h}`, `gen-{scale,slider}.{c,h}`, `get_index.c`, `get_string.c`, + `graph.c`, `histogram.c`, `marquee.c`, `matrix.c`, `popup_dialog.c`, + `radio.c`, `scale.{c,h}`, `selection.c`, `slider.{c,h}`, `swindow.c`, + `template.c`, `u{scale,slider}.{c,h}`, `view_{file,info}.c`, and `viewer.c`. +* `cdk.h` does not `#include` "matrix.h", "viewer.h", and any headers labeled + "Generated headers" due to their machine-dependence. +* `cdk_config.h` no longer defines `HAVE_SETLOCALE` since Textadept handles + locale settings. +* The `deleteFileCB` routine in `fselect.c` has been deactivated. [CDK]: http://invisible-island.net/cdk/ diff --git a/src/textadept.c b/src/textadept.c index 851bf3d1..4d430c8a 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -2281,7 +2281,7 @@ int main(int argc, char **argv) { #endif #endif - setlocale(LC_NUMERIC, "C"); + setlocale(LC_COLLATE, "C"), setlocale(LC_NUMERIC, "C"); if (lua = luaL_newstate(), !lL_init(lua, argc, argv, FALSE)) return 1; new_window(); lL_dofile(lua, "init.lua"); |