Skip to content
Browse files

tabs indexes start with 1 (Lua-indexing)

  • Loading branch information...
1 parent 8f35853 commit c85e17e0d3ef3038b963a1e0aa0de7949ebba00f @nonstop committed Jul 8, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 ChangeLog
  2. +1 −1 src/lua_api.c
  3. +1 −1 src/lua_conf.c
View
1 ChangeLog
@@ -1,3 +1,4 @@
+ tabs indexes start with 1 (Lua-indexing)
fixed desktop file
added Swedish translation (by Tomas Fasth)
version 2.9.4
View
2 src/lua_api.c
@@ -437,7 +437,7 @@ static int termit_lua_currentTab(lua_State* ls)
static int termit_lua_currentTabIndex(lua_State* ls)
{
- lua_pushinteger(ls, termit_get_current_tab_index());
+ lua_pushinteger(ls, termit_get_current_tab_index() + 1);
return 1;
}
View
2 src/lua_conf.c
@@ -390,7 +390,7 @@ static int termit_lua_tabs_index(lua_State* ls)
}
int tab_index = lua_tointeger(ls, -1);
TRACE("tab_index:%d", tab_index);
- return termit_lua_fill_tab(tab_index, ls);
+ return termit_lua_fill_tab(tab_index - 1, ls);
}
static int termit_lua_tabs_newindex(lua_State* ls)

0 comments on commit c85e17e

Please sign in to comment.
Something went wrong with that request. Please try again.