-
Notifications
You must be signed in to change notification settings - Fork 0
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
アクティビティでリロードするとエラるのを修正 #76
Conversation
WalkthroughThe recent update focuses on refining the handling of buffer names in the application. It introduces a more nuanced parsing mechanism to extract expressions from buffer names, shifts the condition for identifying the "Activity" buffer to a more precise criterion, and enhances the way buffer names without numbers are determined by leveraging the fragment part of the parsed buffer name. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- denops/traqvim/main.ts (1 hunks)
Additional comments: 2
denops/traqvim/main.ts (2)
- 126-126: The addition of
bufname.parse(bufName)
to extractexpr
is a good approach for parsing buffer names more effectively. This change should help in accurately identifying the type of buffer, which is crucial for the fix.- 127-127: Changing the condition to check
bufnameParsed.expr === "/Activity"
instead ofbufName === "Activity"
is a significant improvement. This change allows for a more precise identification of activity buffers, addressing the issue at hand effectively.
const bufNameWithoutNumber = | ||
bufnameParsed.fragment?.replace(/\(\d+\)$/, "") || ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifying the extraction of bufNameWithoutNumber
to use bufnameParsed.fragment
when available is a thoughtful adjustment. It ensures that numerical identifiers in buffer names do not interfere with the process of distinguishing between channels and activities. However, ensure that all possible cases where fragment
might not be present are handled gracefully to avoid potential errors.
Consider adding a fallback mechanism or additional checks to handle cases where bufnameParsed.fragment
might be undefined or not present, ensuring robust error handling and application stability.
バッファ名で表示しているのがチャンネルかアクテビティかを判断して、仕分けるように
重複チャンネルを見分け方とかを統一したいかなぁ
Summary by CodeRabbit