Skip to content

Commit

Permalink
Release 4.0.5 version
Browse files Browse the repository at this point in the history
  • Loading branch information
adonais committed Sep 6, 2023
1 parent 19ebf48 commit f7b1f7f
Show file tree
Hide file tree
Showing 76 changed files with 10,650 additions and 4,489 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# skylark:
Skylark Edit is a customizable text/hex editor. Small, Portable, Fast.
Skylark Editor is a customizable text/hex editor. Small, Portable, Fast.
Compared with vs code, atom, and more editors, it can start up in less than a second~~

# features:
Expand Down
5 changes: 3 additions & 2 deletions conf/conf.d/eu_accel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ function eu_accel.loadaccel()
" {bit.bor(FVIRTKEY,FCONTROL), string.byte(\"H\"), IDM_VIEW_HEXEDIT_MODE},\n",
" {bit.bor(FVIRTKEY,FCONTROL,FSHIFT), string.byte(\"N\"), IDM_VIEW_LINENUMBER_VISIABLE},\n",
" {0, 0, IDM_VIEW_BOOKMARK_VISIABLE},\n",
" {0, 0, IDM_SOURCE_BLOCKFOLD_VISIABLE},\n",
" {0, 0, IDM_VIEW_FOLDLINE_VISIABLE},\n",
" {0, 0, IDM_VIEW_WHITESPACE_VISIABLE},\n",
" {0, 0, IDM_VIEW_NEWLINE_VISIABLE},\n",
" {0, 0, IDM_VIEW_INDENTGUIDES_VISIABLE},\n",
" {0, 0, IDM_VIEW_TIPS_ONTAB},\n",
" {0, 0, IDM_VIEW_CODE_HINT},\n",
" {0, 0, IDM_TABCLOSE_FOLLOW},\n",
" {0, 0, IDM_TABCLOSE_ALWAYS},\n",
" {0, 0, IDM_TABCLOSE_NONE},\n",
Expand Down Expand Up @@ -206,7 +207,7 @@ function eu_accel.loadaccel()
end
local m_len = tonumber(#my_code)
if (m_len ~= nil) then
if (m_len < 174) then
if (m_len < 175) then
eu_core.euapi.eu_reset_accs_mask()
end
local m_accel = eu_core.ffi.new("ACCEL[?]", m_len, {})
Expand Down
5 changes: 5 additions & 0 deletions conf/conf.d/eu_conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function eu_conf.loadconf()
"inter_reserved_2 = 0\n" ..
"block_fold_visiable = true\n" ..
"tabs_tip_show_enable = true\n" ..
"code_hint_show_enable = true\n" ..
"tab_close_way = 0\n" ..
"tab_close_draw = 43004\n" ..
"tab_new_way = 0\n" ..
Expand Down Expand Up @@ -187,6 +188,9 @@ function eu_conf.loadconf()
if (history_mask == nil) then
history_mask = 44711
end
if (code_hint_show_enable == nil) then
code_hint_show_enable = true;
end
local m_config = eu_core.ffi.new("struct eu_config", {
newfile_eols,
newfile_encoding,
Expand Down Expand Up @@ -222,6 +226,7 @@ function eu_conf.loadconf()
inter_reserved_2,
block_fold_visiable,
tabs_tip_show_enable,
code_hint_show_enable,
tab_close_way,
tab_close_draw,
tab_new_way,
Expand Down
1 change: 1 addition & 0 deletions conf/conf.d/eu_core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ struct eu_config

bool block_fold;
bool m_tab_tip;
bool m_code_hint;

int m_close_way;
int m_close_draw;
Expand Down
2 changes: 2 additions & 0 deletions conf/conf.d/eu_sci.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3430,6 +3430,7 @@ IDM_VIEW_STATUSBAR = 42604
IDM_VIEW_HEXEDIT_MODE = 30019
IDM_VIEW_LINENUMBER_VISIABLE = 30501
IDM_VIEW_BOOKMARK_VISIABLE = 30207
IDM_VIEW_FOLDLINE_VISIABLE = 30502
IDM_SOURCE_BLOCKFOLD_VISIABLE = 30502
IDM_VIEW_WHITESPACE_VISIABLE = 30500
IDM_VIEW_NEWLINE_VISIABLE = 30108
Expand All @@ -3442,6 +3443,7 @@ IDM_VIEW_SCROLLCURSOR = 30454
IDM_VIEW_ZOOMOUT = 30023
IDM_VIEW_ZOOMIN = 30024
IDM_VIEW_ZOOMRESET = 30416
IDM_VIEW_CODE_HINT = 43012
-- Format
IDM_FORMAT_REFORMAT_JSON = 42250
IDM_FORMAT_COMPRESS_JSON = 42251
Expand Down
10 changes: 5 additions & 5 deletions conf/conf.d/eu_theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ require("eu_core")
function eu_theme.get_default(name)
local theme = nil
if (name == "black") then
theme = -- 默认主题配置文件
theme = -- Dark主题配置文件
"linenumber_font = \"Consolas\"\n" ..
"linenumber_fontsize = 9\n" ..
"linenumber_color = 0x00A0A0A0\n" ..
"linenumber_bgcolor = 0x002B2B2B\n" ..
"linenumber_bold = 0\n" ..
"foldmargin_font = \"Consolas\"\n" ..
"foldmargin_fontsize = 9\n" ..
"foldmargin_color = 0x00000000\n" ..
"foldmargin_color = 0x3C000000\n" ..
"foldmargin_bgcolor = 0x002B2B2B\n" ..
"foldmargin_bold = 0\n" ..
"text_font = \"Consolas\"\n" ..
Expand Down Expand Up @@ -180,7 +180,7 @@ function eu_theme.get_default(name)
"linenumber_bold = 0\n" ..
"foldmargin_font = \"Consolas\"\n" ..
"foldmargin_fontsize = 9\n" ..
"foldmargin_color = 0x00000000\n" ..
"foldmargin_color = 0x3C111111\n" ..
"foldmargin_bgcolor = 0x00F0F0F0\n" ..
"foldmargin_bold = 0\n" ..
"text_font = \"Consolas\"\n" ..
Expand Down Expand Up @@ -339,7 +339,7 @@ function eu_theme.get_default(name)
"dochistory_bgcolor = 0x0000A000\n" ..
"dochistory_bold = 0"
else
theme = -- dark主题配置文件
theme = -- 默认主题配置文件
"linenumber_font = \"Consolas\"\n" ..
"linenumber_fontsize = 9\n" ..
"linenumber_color = 0x00FFFFFF\n" ..
Expand All @@ -348,7 +348,7 @@ function eu_theme.get_default(name)
"foldmargin_font = \"Consolas\"\n" ..
"foldmargin_fontsize = 9\n" ..
-- 折叠标志(+,-)颜色
"foldmargin_color = 0x00707070\n" ..
"foldmargin_color = 0x3C707070\n" ..
-- 折叠栏背景色
"foldmargin_bgcolor = 0x004E4C4C\n" ..
"foldmargin_bold = 0\n" ..
Expand Down
37 changes: 23 additions & 14 deletions locales/src/en-us.rc
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,12 @@ BEGIN
MENUITEM "&Document Map", IDM_VIEW_DOCUMENT_MAP
MENUITEM "&Symbolic Window", IDM_VIEW_SYMTREE
MENUITEM MF_SEPARATOR
MENUITEM "F&ull Screen Mode", IDM_VIEW_FULLSCREEN
MENUITEM "Show M&enubar", IDM_VIEW_MENUBAR
MENUITEM "Show Stat&usbar", IDM_VIEW_STATUSBAR
POPUP "P&anels"
BEGIN
MENUITEM "Full Screen Mode", IDM_VIEW_FULLSCREEN
MENUITEM "Show M&enubar", IDM_VIEW_MENUBAR
MENUITEM "Show Stat&usbar", IDM_VIEW_STATUSBAR
END
POPUP "Adjust Toolbar"
BEGIN
MENUITEM "&Hide", IDB_SIZE_0
Expand All @@ -261,14 +264,25 @@ BEGIN
MENUITEM MF_SEPARATOR
MENUITEM "&Hex Edit View", IDM_VIEW_HEXEDIT_MODE
MENUITEM MF_SEPARATOR
MENUITEM "Highlight The Matching Brace", IDM_VIEW_HIGHLIGHT_BRACE
MENUITEM "Highlight The Matching String", IDM_VIEW_HIGHLIGHT_STR
MENUITEM "Highlight Current &Block", IDM_VIEW_HIGHLIGHT_FOLD
POPUP "H&ighlight"
BEGIN
MENUITEM "Highlight The Matching &Brace", IDM_VIEW_HIGHLIGHT_BRACE
MENUITEM "Highlight The Matching &String", IDM_VIEW_HIGHLIGHT_STR
MENUITEM "Highlight Current Bloc&k", IDM_VIEW_HIGHLIGHT_FOLD
END
MENUITEM "Auto Indent", IDM_EDIT_AUTO_INDENTATION
MENUITEM MF_SEPARATOR
MENUITEM "Line &Numbers", IDM_VIEW_LINENUMBER_VISIABLE
MENUITEM "Show Bookmark", IDM_VIEW_BOOKMARK_VISIABLE
MENUITEM "Show Fold Lines", IDM_SOURCE_BLOCKFOLD_VISIABLE
POPUP "&Display", IDM_VIEW_DISPLAY_PLACEHOLDE
BEGIN
MENUITEM "Line Numbers", IDM_VIEW_LINENUMBER_VISIABLE
MENUITEM "Show Bookmark", IDM_VIEW_BOOKMARK_VISIABLE
MENUITEM "Show Fold Lines", IDM_VIEW_FOLDLINE_VISIABLE
MENUITEM "Show White Space", IDM_VIEW_WHITESPACE_VISIABLE
MENUITEM "Show Wrap Symbol", IDM_VIEW_NEWLINE_VISIABLE
MENUITEM "Show Indent Guide", IDM_VIEW_INDENTGUIDES_VISIABLE
MENUITEM "Show Tips On Tabs", IDM_VIEW_TIPS_ONTAB
MENUITEM "Fold Box Code Hint", IDM_VIEW_CODE_HINT
END
POPUP "Change History Marker", IDM_VIEW_HISTORY_PLACEHOLDE
BEGIN
MENUITEM "Do Not Show", IDM_VIEW_HISTORY_NONE
Expand All @@ -277,11 +291,6 @@ BEGIN
MENUITEM "Show In Both Above", IDM_VIEW_HISTORY_ALL
END
MENUITEM MF_SEPARATOR
MENUITEM "Show White Space", IDM_VIEW_WHITESPACE_VISIABLE
MENUITEM "Show Wrap Symbol", IDM_VIEW_NEWLINE_VISIABLE
MENUITEM "Show Indent Guide", IDM_VIEW_INDENTGUIDES_VISIABLE
MENUITEM MF_SEPARATOR
MENUITEM "Show Tips On Tabs", IDM_VIEW_TIPS_ONTAB
POPUP "Activated When Closing Tab"
BEGIN
MENUITEM "The Left Tab", IDM_VIEW_LEFT_TAB
Expand Down
37 changes: 23 additions & 14 deletions locales/src/zh-cn.rc
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,12 @@ BEGIN
MENUITEM "文档结构图(&D)", IDM_VIEW_DOCUMENT_MAP
MENUITEM "符号链接窗口(&S)", IDM_VIEW_SYMTREE
MENUITEM MF_SEPARATOR
MENUITEM "全屏模式(&U)", IDM_VIEW_FULLSCREEN
MENUITEM "显示菜单栏", IDM_VIEW_MENUBAR
MENUITEM "显示状态栏", IDM_VIEW_STATUSBAR
POPUP "面板(&A)"
BEGIN
MENUITEM "全屏模式", IDM_VIEW_FULLSCREEN
MENUITEM "显示菜单栏", IDM_VIEW_MENUBAR
MENUITEM "显示状态栏", IDM_VIEW_STATUSBAR
END
POPUP "调整工具栏"
BEGIN
MENUITEM "隐藏(&H)", IDB_SIZE_0
Expand All @@ -261,14 +264,25 @@ BEGIN
MENUITEM MF_SEPARATOR
MENUITEM "十六进制视图(&H)", IDM_VIEW_HEXEDIT_MODE
MENUITEM MF_SEPARATOR
MENUITEM "高亮显示匹配的括号", IDM_VIEW_HIGHLIGHT_BRACE
MENUITEM "高亮显示匹配的字符串", IDM_VIEW_HIGHLIGHT_STR
MENUITEM "高亮当前代码块", IDM_VIEW_HIGHLIGHT_FOLD
POPUP "高亮(&I)"
BEGIN
MENUITEM "高亮匹配的括号(&B)", IDM_VIEW_HIGHLIGHT_BRACE
MENUITEM "高亮匹配的字符串(&S)", IDM_VIEW_HIGHLIGHT_STR
MENUITEM "高亮当前代码块(&K)", IDM_VIEW_HIGHLIGHT_FOLD
END
MENUITEM "自动缩进", IDM_EDIT_AUTO_INDENTATION
MENUITEM MF_SEPARATOR
MENUITEM "显示行号", IDM_VIEW_LINENUMBER_VISIABLE
MENUITEM "显示书签", IDM_VIEW_BOOKMARK_VISIABLE
MENUITEM "显示折叠线", IDM_SOURCE_BLOCKFOLD_VISIABLE
POPUP "显示(&D)", IDM_VIEW_DISPLAY_PLACEHOLDE
BEGIN
MENUITEM "显示行号", IDM_VIEW_LINENUMBER_VISIABLE
MENUITEM "显示书签", IDM_VIEW_BOOKMARK_VISIABLE
MENUITEM "显示折叠线", IDM_VIEW_FOLDLINE_VISIABLE
MENUITEM "显示白字符", IDM_VIEW_WHITESPACE_VISIABLE
MENUITEM "显示换行符", IDM_VIEW_NEWLINE_VISIABLE
MENUITEM "显示缩进线", IDM_VIEW_INDENTGUIDES_VISIABLE
MENUITEM "标签提示信息", IDM_VIEW_TIPS_ONTAB
MENUITEM "折叠框代码提示", IDM_VIEW_CODE_HINT
END
POPUP "变更记录标记", IDM_VIEW_HISTORY_PLACEHOLDE
BEGIN
MENUITEM "不显示", IDM_VIEW_HISTORY_NONE
Expand All @@ -277,11 +291,6 @@ BEGIN
MENUITEM "在以上两者中显示", IDM_VIEW_HISTORY_ALL
END
MENUITEM MF_SEPARATOR
MENUITEM "显示白字符", IDM_VIEW_WHITESPACE_VISIABLE
MENUITEM "显示换行符", IDM_VIEW_NEWLINE_VISIABLE
MENUITEM "显示缩进线", IDM_VIEW_INDENTGUIDES_VISIABLE
MENUITEM MF_SEPARATOR
MENUITEM "在标签上显示提示信息", IDM_VIEW_TIPS_ONTAB
POPUP "关闭标签时激活"
BEGIN
MENUITEM "左边的标签", IDM_VIEW_LEFT_TAB
Expand Down
6 changes: 6 additions & 0 deletions share/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
4.0.5 2023-09-06 adonais
* 新增: 折叠框代码提示
* 变更: 重新整理了视图菜单栏
* 变更: 折叠栏支持DPI缩放
* 修复: 共享路径重新打开时的问题

4.0.4 2023-08-26 adonais
* 新增: 显示变更历史标记菜单选项
* 新增: 搜索变更历史功能
Expand Down
2 changes: 1 addition & 1 deletion src/3rdparty/luajit/src/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ lj_asm.o: lj_asm.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_gc.h \
lj_buf.h lj_str.h lj_tab.h lj_frame.h lj_bc.h lj_ctype.h lj_ir.h \
lj_jit.h lj_ircall.h lj_iropt.h lj_mcode.h lj_trace.h lj_dispatch.h \
lj_traceerr.h lj_snap.h lj_asm.h lj_vm.h lj_target.h lj_target_*.h \
lj_emit_*.h lj_asm_*.h
lj_prng.h lj_emit_*.h lj_asm_*.h
lj_assert.o: lj_assert.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h
lj_bc.o: lj_bc.c lj_obj.h lua.h luaconf.h lj_def.h lj_arch.h lj_bc.h \
lj_bcdef.h
Expand Down
13 changes: 7 additions & 6 deletions src/3rdparty/luajit/src/host/genversion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
-- Released under the MIT license. See Copyright Notice in luajit.h
----------------------------------------------------------------------------

local FILE_INPUT_H = "luajit_rolling.h"
local FILE_INPUT_R = "luajit_relver.txt"
local FILE_OUTPUT_H = "luajit.h"
local FILE_ROLLING_H = "luajit_rolling.h"
local FILE_RELVER_TXT = "luajit_relver.txt"
local FILE_LUAJIT_H = "luajit.h"

local function file_read(file)
local fp = assert(io.open(file, "rb"), "run from the wrong directory")
Expand All @@ -28,8 +28,8 @@ local function file_write_mod(file, data)
assert(fp:close())
end

local text = file_read(FILE_INPUT_H)
local relver = file_read(FILE_INPUT_R):match("(%d+)")
local text = file_read(FILE_ROLLING_H)
local relver = file_read(FILE_RELVER_TXT):match("(%d+)")

if relver then
text = text:gsub("ROLLING", relver)
Expand All @@ -38,6 +38,7 @@ else
**** WARNING Cannot determine rolling release version from git log.
**** WARNING The 'git' command must be available during the build.
]])
file_write_mod(FILE_RELVER_TXT, "ROLLING\n") -- Fallback for install target.
end

file_write_mod(FILE_OUTPUT_H, text)
file_write_mod(FILE_LUAJIT_H, text)
49 changes: 49 additions & 0 deletions src/3rdparty/luajit/src/lj_asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "lj_dispatch.h"
#include "lj_vm.h"
#include "lj_target.h"
#include "lj_prng.h"

#ifdef LUA_USE_ASSERT
#include <stdio.h>
Expand Down Expand Up @@ -93,6 +94,12 @@ typedef struct ASMState {
MCode *flagmcp; /* Pending opportunity to merge flag setting ins. */
MCode *realign; /* Realign loop if not NULL. */

#ifdef LUAJIT_RANDOM_RA
/* Randomize register allocation. OK for fuzz testing, not for production. */
uint64_t prngbits;
PRNGState prngstate;
#endif

#ifdef RID_NUM_KREF
intptr_t krefk[RID_NUM_KREF];
#endif
Expand Down Expand Up @@ -173,6 +180,41 @@ IRFLDEF(FLOFS)
0
};

#ifdef LUAJIT_RANDOM_RA
/* Return a fixed number of random bits from the local PRNG state. */
static uint32_t ra_random_bits(ASMState *as, uint32_t nbits) {
uint64_t b = as->prngbits;
uint32_t res = (1u << nbits) - 1u;
if (b <= res) b = lj_prng_u64(&as->prngstate) | (1ull << 63);
res &= (uint32_t)b;
as->prngbits = b >> nbits;
return res;
}

/* Pick a random register from a register set. */
static Reg rset_pickrandom(ASMState *as, RegSet rs)
{
Reg r = rset_pickbot_(rs);
rs >>= r;
if (rs > 1) { /* More than one bit set? */
while (1) {
/* We need to sample max. the GPR or FPR half of the set. */
uint32_t d = ra_random_bits(as, RSET_BITS-1);
if ((rs >> d) & 1) {
r += d;
break;
}
}
}
return r;
}
#define rset_picktop(rs) rset_pickrandom(as, rs)
#define rset_pickbot(rs) rset_pickrandom(as, rs)
#else
#define rset_picktop(rs) rset_picktop_(rs)
#define rset_pickbot(rs) rset_pickbot_(rs)
#endif

/* -- Target-specific instruction emitter --------------------------------- */

#if LJ_TARGET_X86ORX64
Expand Down Expand Up @@ -2442,6 +2484,9 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
as->realign = NULL;
as->loopinv = 0;
as->parent = J->parent ? traceref(J, J->parent) : NULL;
#ifdef LUAJIT_RANDOM_RA
(void)lj_prng_u64(&J2G(J)->prng); /* Ensure PRNG step between traces. */
#endif

/* Reserve MCode memory. */
as->mctop = as->mctoporig = lj_mcode_reserve(J, &as->mcbot);
Expand Down Expand Up @@ -2483,6 +2528,10 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
#endif
as->ir = J->curfinal->ir; /* Use the copied IR. */
as->curins = J->cur.nins = as->orignins;
#ifdef LUAJIT_RANDOM_RA
as->prngstate = J2G(J)->prng; /* Must (re)start from identical state. */
as->prngbits = 0;
#endif

RA_DBG_START();
RA_DBGX((as, "===== STOP ====="));
Expand Down
Loading

0 comments on commit f7b1f7f

Please sign in to comment.