aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-02-08 13:37:51 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2009-02-08 13:37:51 -0500
commit20ae835da5a2fc1f0c2106f85758825d0cfd97e3 (patch)
tree9782c0f817e844b56fd2f9b731335d90aeedc9cd /src
parent33e9c58f408be3c42144b28464a029902580031d (diff)
Removed buffer:find() function.
Diffstat (limited to 'src')
-rw-r--r--src/lua_interface.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c
index 64deb259..e50784dc 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -60,7 +60,6 @@ static int l_buffer_mt_index(lua_State *lua),
static int l_cf_ta_buffer_new(lua_State *lua),
l_cf_buffer_delete(lua_State *lua),
- l_cf_buffer_find(lua_State *lua),
l_cf_buffer_text_range(lua_State *lua),
l_cf_view_focus(lua_State *lua),
l_cf_view_split(lua_State *lua),
@@ -316,7 +315,6 @@ int l_add_scintilla_buffer(sptr_t doc) {
lua_newtable(lua);
lua_pushnumber(lua, doc);
lua_setfield(lua, -2, "doc_pointer");
- l_cfunc(lua, l_cf_buffer_find, "find");
l_cfunc(lua, l_cf_buffer_text_range, "text_range");
l_cfunc(lua, l_cf_buffer_delete, "delete");
l_mt(lua, "_buffer_mt", l_buffer_mt_index, l_buffer_mt_newindex);
@@ -1343,24 +1341,6 @@ static int l_cf_buffer_delete(lua_State *lua) {
return 0;
}
-static int l_cf_buffer_find(lua_State *lua) {
- l_check_focused_buffer(lua, 1);
- TextToFind ttf = {{0, 0}, 0, {0, 0}};
- ttf.lpstrText = const_cast<char*>(luaL_checkstring(lua, 2));
- int args = lua_gettop(lua), flags = 0;
- if (args > 2) flags = luaL_checkinteger(lua, 3);
- if (args > 3) ttf.chrg.cpMin = luaL_checkinteger(lua, 4);
- ttf.chrg.cpMax = (args > 4) ? luaL_checkinteger(lua, 5)
- : SS(SCINTILLA(focused_editor), SCI_GETLENGTH);
- int pos = SS(SCINTILLA(focused_editor), SCI_FINDTEXT, flags,
- reinterpret_cast<sptr_t>(&ttf));
- if (pos > -1) {
- lua_pushinteger(lua, ttf.chrgText.cpMin);
- lua_pushinteger(lua, ttf.chrgText.cpMax);
- return 2;
- } else return 0;
-}
-
static int l_cf_buffer_text_range(lua_State *lua) {
l_check_focused_buffer(lua, 1);
#ifndef MAC