Skip to content

Commit d4576f5

Browse files
committed
a little fix about caret position
1 parent a8bcbe4 commit d4576f5

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

launch.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ cmake -G "Visual Studio 17 2022" -A x64 -S . -B ./build/
2424
if ($LASTEXITCODE -eq 0)
2525
{
2626
# DEBUG version
27-
cmake --build ./build/ --config DEBUG
27+
# cmake --build ./build/ --config DEBUG
2828
# RELEASE version
29-
# cmake --build ./build/ --config RELEASE
29+
cmake --build ./build/ --config RELEASE
3030
if ($LASTEXITCODE -eq 0)
3131
{
3232
$content = Get-Content -Path "./CMakeLists.txt"

main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine,
116116

117117
// 初始化小鹤双拼的码表,纯双拼二码
118118
// std::string dbPath = "../../src/flyciku.db";
119-
// std::string dbPath = "./db/flyciku.db";
120-
std::string dbPath = "./build/Debug/db/flyciku.db";
119+
// 如果是发布阶段,就用这个
120+
std::string dbPath = "./db/flyciku.db";
121+
// 如果是调试阶段,那么,就用下面这个
122+
// std::string dbPath = "./build/Debug/db/flyciku.db";
121123
// sqlPageMap = transTableToMap(dbPath, 8); //
122124
// 如果把这个放到钩子函数里面会导致程序很慢的
123125
db = openSqlite(dbPath);

src/utils/caret_helper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ std::pair<int, int> getGeneralCaretPos()
154154
if (caretPos.first == 0 && caretPos.second == 0)
155155
{
156156
// caretPos = getCursorPosBySys();
157-
caretPos = getCenterPointPosOfCurScreen();
158-
caretPos.first += 20;
159-
caretPos.second += 30;
157+
caretPos = getCenterPointPosOfCurScreen(); // 既然是中心点的坐标,那么,就不需要做多余的处理
158+
// caretPos.first += 20;
159+
// caretPos.second += 30;
160160
}
161161

162162
// std::cout << caretPos.first << '\t' << caretPos.second << '\n';

0 commit comments

Comments
 (0)