Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #36 #175

Merged
merged 4 commits into from
Aug 15, 2019
Merged

fix #36 #175

merged 4 commits into from
Aug 15, 2019

Conversation

ArcticLampyrid
Copy link
Contributor

@ArcticLampyrid ArcticLampyrid commented Aug 14, 2019


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


IssueHunt has been backed by the following sponsors. Become a sponsor

@lc-soft
Copy link
Owner

lc-soft commented Aug 14, 2019

Can you upload screenshots ?

src/main.c Outdated Show resolved Hide resolved
src/gui/widget/textcaret.c Outdated Show resolved Hide resolved
src/main.c Outdated Show resolved Hide resolved
include/LCUI/main.h Outdated Show resolved Hide resolved
src/platform/windows/windows_ime.c Show resolved Hide resolved
src/platform/windows/windows_ime.c Outdated Show resolved Hide resolved
src/platform/windows/windows_ime.c Outdated Show resolved Hide resolved
src/platform/windows/windows_ime.c Outdated Show resolved Hide resolved
@lc-soft lc-soft self-assigned this Aug 14, 2019
@lc-soft lc-soft added this to the v1.3.0 milestone Aug 14, 2019
@ArcticLampyrid
Copy link
Contributor Author

I'm sorry that I don't know much about the code structure of this project.
I have pushed a new version to implement SetCaret by using a normal IME method.
Plus: Can I use Chinese here?

@lc-soft
Copy link
Owner

lc-soft commented Aug 15, 2019

能用中文就用中文,整英文反而增加沟通成本。

src/ime.c Outdated
@@ -270,6 +270,13 @@ void LCUI_InitIME(void)
#endif
}

void LCUIIME_SetCaret(LCUI_Pos pos)
{
if (self.ime->handler.setcaret == NULL)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if 里就算只有一行语句也应该加花括号。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只是处理 if 条件成立的情况,那可以写成:

if (self.ime->handler.setcaret) {
        self.ime->handler.setcaret(pos);
}

src/gui/widget/textcaret.c Show resolved Hide resolved
HWND hwnd = GetActiveWindow();
HIMC hIMC = ImmGetContext(hwnd);
if (hIMC) {
COMPOSITIONFORM Composition;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composition 改成小写 composition

src/ime.c Outdated
@@ -270,6 +270,13 @@ void LCUI_InitIME(void)
#endif
}

void LCUIIME_SetCaret(LCUI_Pos pos)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LCUI_Pos 是以前定义数据类型,现在已经尽量不用它了,请使用 x y 两个变量代替

static void IME_SetCaret(LCUI_Pos pos)
{
HWND hwnd = GetActiveWindow();
HIMC hIMC = ImmGetContext(hwnd);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hIMC 改成小写 himc

@ArcticLampyrid
Copy link
Contributor Author

(PR updated)

@lc-soft
Copy link
Owner

lc-soft commented Aug 15, 2019

@1354092549 效果图发一下,最好是 gif 屏幕录像,windows 系统可以用 ScreenToGif 录制。

@ArcticLampyrid
Copy link
Contributor Author

GIF
另外考虑一下布置cpplint之类的检查器?

@lc-soft
Copy link
Owner

lc-soft commented Aug 15, 2019

另外考虑一下布置cpplint之类的检查器?

现在用的是 clang-format

@ArcticLampyrid
Copy link
Contributor Author

现在用的是 clang-format

clang-format貌似不包括 命名检查?

@lc-soft
Copy link
Owner

lc-soft commented Aug 15, 2019

clang-format貌似不包括 命名检查?

@1354092549 是的,只是个格式化工具,没检查功能。

@lc-soft lc-soft merged commit c9f04ab into lc-soft:develop Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants