Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "searchcode"
version = "0.6.2"
version = "0.6.3"
description = "Simple, comprehensive code search."
authors = ["Ritchie Mwewa <rly0nheart@duck.com>"]
license = "GPLv3+"
Expand Down
2 changes: 1 addition & 1 deletion src/searchcode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from .api import Searchcode

__pkg__ = "searchcode"
__version__ = "0.6.2"
__version__ = "0.6.3"
__author__ = "Ritchie Mwewa"

__all__ = ["Searchcode"]
Expand Down
17 changes: 10 additions & 7 deletions src/searchcode/_cli/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ def _make_syntax(code: str, language: str, **syntax_kwargs) -> Syntax:
:return: A rich Syntax object for displaying code.
:rtype: Syntax
"""
return Syntax(code=code, lexer=language, theme="dracula", **syntax_kwargs)
return Syntax(
code=code,
lexer=language,
theme="dracula",
word_wrap=True,
indent_guides=True,
**syntax_kwargs,
)


def _make_syntax_panel(
Expand Down Expand Up @@ -71,7 +78,7 @@ def _make_syntax_panel(

def print_panels(
data: t.Union[t.List[SimpleNamespace], SimpleNamespace, str], **kwargs
) -> None:
):
"""
Print panels for displaying code or structured file information.

Expand All @@ -84,8 +91,6 @@ def print_panels(
:type data: Union[List[SimpleNamespace], SimpleNamespace, str]
:param kwargs: Additional optional keyword arguments (e.g., id for logging).
:type kwargs: Any
:return: None
:rtype: None
"""
panels: t.List[Panel] = []

Expand Down Expand Up @@ -117,9 +122,7 @@ def print_panels(
lines_dict=lines.__dict__
)

syntax = _make_syntax(
code=code_string, language=language, word_wrap=False, indent_guides=True
)
syntax = _make_syntax(code=code_string, language=language)

header_text = (
f"[bold]{filename}[/] ([blue]{repo}[/]) "
Expand Down